wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
324 stars 16 forks source link

Show warning if on-demand keyboard interactivity is not supported #142

Closed wmww closed 1 year ago

wmww commented 1 year ago

By opening this pull request, I agree for my modifications to be licensed under whatever licenses are indicated at the start of the files I modified

alebastr commented 1 year ago

Note that wlroots 0.13..0.16 (current release) are not allowing to specify the supported wlr-layer-shell version from the compositor and will always report 4. The API update will be available in 0.17.

Not meant to discourage the change, it's the right thing to do. Just needs some kind of a disclaimer that it's not going to improve the situation right now.

Tamaranch commented 1 year ago

@wmww Why defaulting to exclusive instead of none? This is what was happening before this change if I understand correctly. If on-demand is not supported, the client will keep the access to the keyboard without ever giving it back.

It is possible to check if GTK Layer Shell has honored the request, but in that case you might as well do the protocol version check yourself (which I will probably do for xfce4-panel if this is not changed: see https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/732).

wmww commented 1 year ago

Oh, huh, yeah I guess I missed the code that already did this in layer-surface.c, but with different behavior. Good thing this didn't make it into a release. Will revert.