[PATCH] Introduce keyboard grabbing protocol

Giulio Camuffo giuliocamuffo at gmail.com
Tue Aug 30 12:12:29 UTC 2016


2016-08-30 13:58 GMT+02:00 Olivier Fourdan <ofourdan at redhat.com>:
> Hi Giulio,
>
>> i have a couple of comments below
>
> Thanks a lot for your quick reply!
>
>> 2016-08-30 11:54 GMT+02:00 Olivier Fourdan <ofourdan at redhat.com>:
>> > [...]
>>
>> I can understand the Xwayland use, but not the VM one. If i'm using a
>> VM i expect it to receive key events when focused, not otherwise. If
>> the point of this is just to inhibit the compositor's shortcuts than i
>> think the protocol should just do that, and not do an actual grab.
>> Additionally, as a user i'm not sure i would want my shortcuts to stop
>> working, ever...
>
> On X11, some VM viewer will grab the keyboard and pointer so that all input events are set to the window, with one special shortcut to release those grabs - Using the grab keyboard protocol drafted here would allow to do that in Wayland as well.

I know they do, but while i understand the use of mouse grabbing to
avoid going outside the window, i don't understand the use of keyboard
grabbing. If the window is focused it will receive key events, if it's
not focused as a user i would be surprised to see it still receiving
events. But that doesn't happen, because to focus another window you
need first to break the grab (and i assume an implementation of your
protocol would break the grab when a surface from another client is
focused). So, I can't see what key events would the grab actually
intercept, besides the compositor's shortcuts.

>
> Besides, reducing the use of the keyboard grab to Xwayland only might be a tad restrictive.
>
>> [...]
>>
>> I don't think it makes sense to send errors for those, it seems like
>> both cases are out of the client's direct control and as such the
>> client cannot be sure to avoid them, so it should survive when they
>> happen.
>
> Oh absolutely, good point!
>
> Cheers,
> Olivier


More information about the wayland-devel mailing list