[PATCH] Introduce keyboard grabbing protocol
sardemff7+wayland at sardemff7.net
Tue Aug 30 12:39:17 UTC 2016
On 30/08/2016 12:18, Giulio Camuffo wrote:
> i have a couple of comments below
> 2016-08-30 11:54 GMT+02:00 Olivier Fourdan <ofourdan at redhat.com>:
>> + <description summary="Protocol for grabbing the keyboard">
>> + This protocol specifies a way for a client to request all keyboard
>> + events to be forwarded to a surface.
>> + A possible use case for this is a virtual machine or a remote
>> + connection viewer where all key events must be sent to the specific
>> + surface, ignoring the compositor own's shortcuts.
>> + Another use case is Xwayland. Unlike the X11 protocol, Wayland
>> + doesn't have the notion of active grab on the keyboard. When an
>> + X11 client acquires an active grab on the keyboard, all key events
>> + are reported only to the grabbing X11 client.
>> + When running in Xwayland, X11 applications may acquire an active
>> + grab but that cannot be translated to the Wayland compositor who
>> + may set the input focus to some other surface, thus breaking the
>> + X11 client assumption that all key events are reported.
> 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...
I agree. The VM use case should use the pointer constraint protocol, and
get relative events and all that stuff.
If you use VMs often enough, you probably want to configure them to
avoid keybinding collisions.
Xwayland should probably use a private protocol, like EGL, ideally
completely hidden and pid-restricted.
Quentin “Sardem FF7” Glidic
More information about the wayland-devel