[PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols
Olivier Fourdan
ofourdan at redhat.com
Wed Mar 22 16:27:21 UTC 2017
[Resending because I sent to wayland-devel-bounce by mistake -facepalm-]
Hi,
This is a follow-up on my previous attempt to add a keyboard grabbing
protocol for Xwayland [0].
While I had the previous iteration working in Xwayland and mutter, this
was clearly not acceptable for Wayland native windows.
So I reckon we actually need two protocols, one specifically for Xwayland
and another one for Wayland native clients.
The one for Xwayland allows to re-route keyboard events to a given surface
even when the surface doesn't have actual keyboard focus. This is needed
for X11 applications that map an override redirect window (thus never
actually focused by the window manager) but issueing an active grab on
the keyboard to capture all keyboard events. An example of this is
xscreensaver unlock dialog [1] or gksu [2]
The second protocol is simpler, in the sense that it will simply tell the
Wayland compositor to ignore its own keyboard shortcuts when a given surface
is focused. A typical use case for this is virt-viewer/virt-manager where the
typical window manager shortcuts should be send to the remote host rather
than being caught and handled by the local Wayland compositor [3].
I have sample implementations of these two protcols in Xwayland, mutter
and gtk+ and it seems to work well, for both cases (x11 O-R window under
Xwayland and virt-viewer using Wayland native).
Cheers,
Olivier
[0] https://lists.freedesktop.org/archives/wayland-devel/2016-August/030863.html
[1] https://bugs.freedesktop.org/show_bug.cgi?id=96547
[2] https://bugzilla.gnome.org/show_bug.cgi?id=752956
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1285770
Olivier Fourdan (2):
Introduce keyboard grabbing protocol for Xwayland
Add keyboard shortcuts inhibitor
Makefile.am | 2 +
configure.ac | 2 +-
unstable/keyboard-shortcuts-inhibit/README | 4 +
.../keyboard-shortcuts-inhibit-unstable-v1.xml | 85 +++++++++++++++++
unstable/xwayland-keyboard-grab/README | 4 +
.../xwayland-keyboard-grab-unstable-v1.xml | 101 +++++++++++++++++++++
6 files changed, 197 insertions(+), 1 deletion(-)
create mode 100644 unstable/keyboard-shortcuts-inhibit/README
create mode 100644 unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
create mode 100644 unstable/xwayland-keyboard-grab/README
create mode 100644 unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
--
2.9.3
More information about the xorg-devel
mailing list