xserver-multidpi/hw
Olivier Fourdan c7730cfe55 xwayland: Translate keyboard grabs on the root window
When an X11 client issues an active grab on the keyboard, Xwayland
forward this to the Wayland compositor using the Xwayland specific
protocol "xwayland-keyboard-grab" if it can find the corresponding
Xwayland window.

Some X11 clients (typically older games) however try to issue the
keyboard grab on the X11 root window, which has obviously no matching
Xwayland window. In such a case, the grab is simply ignored and the game
will not work as expected.

To workaround that issue, if an X11 client issues a keyboard grab on the
root window, Xwayland will search for a toplevel window belonging to the
same X11 client that it can use as the grab window instead.

This way, the grab can be forwarded to the Wayland compositor that can
either grant or deny the request based on the window and its internal
policies.

The heuristic picks the first realized toplevel window belonging to the
client so that the Wayland compositor will send it the keyboard events,
and the Xserver grab mechanism will then take care of routing the events
to the expected X11 window by itself.

v2: Make the test more clear (Dor Askayo <dor.askayo@gmail.com>)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Jonas Ã…dahl <jadahl@gmail.com>
See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/1249
2021-02-02 09:49:35 +00:00
..
dmx mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
kdrive mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
vfb mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
xfree86 mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
xnest mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
xquartz xquartz: Ensure that NSRunAlertPanel() is run on the main thread 2021-02-02 00:46:26 +00:00
xwayland xwayland: Translate keyboard grabs on the root window 2021-02-02 09:49:35 +00:00
xwin mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build meson: Move Xvfb build under an option. 2017-09-20 13:19:21 -04:00