Bug 5647 - keyboard grab doesn't work under Xwayland
: keyboard grab doesn't work under Xwayland
Status: NEW
: ThinLinc
: pre-1.0
: PC Unknown
: P2 Normal
: MediumPrio
Assigned To:
: 7373
: 5646
  Show dependency treegraph
Reported: 2015-09-22 15:59 by
Modified: 2020-01-14 14:40 (History)
Acceptance Criteria:



You need to log in before you can comment on or make changes to this bug.

Description From cendio 2015-09-22 15:59:58
I tested running tlclient under Gnome and Wayland on my Fedora 22. Everything
seems to work well, except for keyboard grab. I.e. things like alt-tab do not
work properly in full screen.

This may be a general wayland problem though. See this part of the wayland


I doubt they can keep this model though as any remote access or virtualisation
product requires keyboard grab at one point or another. We'll have to keep an
eye on things and see how it develops.
------- Comment #1 From cendio 2016-07-19 09:27:43 -------
Upstream work:

------- Comment #2 From cendio 2017-02-28 14:19:56 -------
Still a problem on Fedora 25, maybe we should try to detect and disable the
"Send system keys" option when running client on Xwayland, at least add
platform specific note.
------- Comment #3 From cendio 2017-02-28 14:43:48 -------
It's not obvious how to detect wayland as I can notice that a wayland display
socket is created even if I log in to a X11 session. However a connect to this
socket fails.

The socket is available as ${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}

Perhaps we can detect Xwayland somehow?
------- Comment #4 From cendio 2017-10-23 16:40:39 -------
Mechanisms are getting finalised. However we need to do some window manager
interaction. See this comment upstream:

------- Comment #6 From cendio 2018-06-15 16:48:13 -------
This now works on Fedora Rawhide (for upstream vncviewer). Note though that the
function is disabled by default, and you have to muck around in dconf to enable
it. :/
------- Comment #7 From cendio 2019-06-18 16:23:16 -------
The setting you need to change is
"org.gnome.mutter.wayland.xwayland-allow-grabs". However upstream has now
dropped that requirement from the upcoming version:


So it should mean that GNOME 3.34 is easier to get working.
------- Comment #8 From cendio 2019-06-18 16:24:18 -------
The version of GNOME supporting grabs in Wayland (3.28) has now also trickled
out to distributions. Fedora has it, as does RHEL 7 and 8.
------- Comment #9 From cendio 2019-06-18 16:34:38 -------
Fixed the main part upstream, so we'll get this sorted out in the next vendor


Unfortunately I discovered that upstream had forgotten about XGrabPointer(), so
it still doesn't fully work:


It gets a lot better with that first fix though.
------- Comment #10 From cendio 2019-06-25 15:30:16 -------
Also note that it is possible to get grabs working without modifying the
ThinLinc client by explicitly adding "thinlinc-client" to the dconf setting