[PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols
ofourdan at redhat.com
Wed Mar 22 16:27:21 UTC 2017
[Resending because I sent to wayland-devel-bounce by mistake -facepalm-]
This is a follow-up on my previous attempt to add a keyboard grabbing
protocol for Xwayland .
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  or gksu 
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 .
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).
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
More information about the wayland-devel