GNOME Bugzilla – Bug 767475
[WAYLAND] Modifiers not propagated to X11 apps
Last modified: 2016-12-14 16:24:07 UTC
To move from one workspace to another, you'll most likely use a key combo like : Ctrl-Alt-Up/Down. Let's say you move from a gnome-terminal (which is a wayland app on a wayland sessions) to a Chrome/Chromium (which is a x11 app), when you started moving from the terminal to Chrome, you had the Ctrl & Alt key pressed already. At the end of the workspace transition, the keyboard focus is on the Chrome window and you're still holding the Ctrl key. Now you press 't' to create a new tab in Chrome. But that doesn't work and send the 't' character to the current tab. To actually create the tab you'll need to release the Ctrl key and repress it before this can actually work. It seems modifiers are not propagated when the window manager switches the focus from an wayland app to a X11 app, but it works the other way around. I'm guessing we're missing something in mutter.
Works fine here. Which version of Xwayland are you using?
mutter : 3.20.2 gnome-shell : 3.20.2 xwayland : 1.18.3
Ah, sorry, my bad, I thought you were saying the the modifiers remained stuck even if released physically... What you're saying is actually the opposite, one has to release the modifiers first then re-press it again in the X11 window for this to work.
Not sure if that's a mutter or an Xwayland issue though...
Yeah, that's right. Not sure either :)
I was suspecting Xwayland but it seems that the keys array passed via the enter event in mutter is empty whereas weston, for example, rightfully list the keys being pressed at the time of the enter. A closer look at mutter code gives this: https://git.gnome.org/browse/mutter/tree/src/wayland/meta-wayland-keyboard.c#n654 So this is on purpose, apparently.
Created attachment 329714 [details] [review] xwayland patch Can you try this xwayland patch for a while? It fixes this bug but I'm not sure it won't break something else.
Fixes the bug indeed. I shall report in a week and see if anything has gone wrong :) Thanks!
Been using this patch for a couple of weeks now, I haven't noticed any new issue. Looks fine from here :)
Thanks, submitted upstream: https://patchwork.freedesktop.org/patch/95244/
It seems there is a Reviewed-by: Daniel Stone on the upstream patch, but I can't see it in the git log. Is anyone on this bug able to push the patch?
Fixed with xwayland 1.19.0.