After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767475 - [WAYLAND] Modifiers not propagated to X11 apps
[WAYLAND] Modifiers not propagated to X11 apps
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-06-09 23:39 UTC by Lionel Landwerlin
Modified: 2016-12-14 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xwayland patch (2.57 KB, patch)
2016-06-13 19:02 UTC, Rui Matos
none Details | Review

Description Lionel Landwerlin 2016-06-09 23:39:50 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.
Comment 1 Olivier Fourdan 2016-06-10 12:10:29 UTC
Works fine here.

Which version of Xwayland are you using?
Comment 2 Lionel Landwerlin 2016-06-10 12:56:42 UTC
mutter : 3.20.2
gnome-shell : 3.20.2
xwayland : 1.18.3
Comment 3 Olivier Fourdan 2016-06-10 13:27:50 UTC
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.
Comment 4 Olivier Fourdan 2016-06-10 13:28:44 UTC
Not sure if that's a mutter or an Xwayland issue though...
Comment 5 Lionel Landwerlin 2016-06-10 13:29:45 UTC
Yeah, that's right. Not sure either :)
Comment 6 Olivier Fourdan 2016-06-13 13:10:36 UTC
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.
Comment 7 Rui Matos 2016-06-13 19:02:12 UTC
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.
Comment 8 Lionel Landwerlin 2016-06-13 22:59:44 UTC
Fixes the bug indeed.
I shall report in a week and see if anything has gone wrong :)
Thanks!
Comment 9 Lionel Landwerlin 2016-06-25 13:56:44 UTC
Been using this patch for a couple of weeks now, I haven't noticed any new issue.
Looks fine from here :)
Comment 10 Rui Matos 2016-06-26 17:50:00 UTC
Thanks, submitted upstream: https://patchwork.freedesktop.org/patch/95244/
Comment 11 Lionel Landwerlin 2016-08-02 21:44:11 UTC
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?
Comment 12 Lionel Landwerlin 2016-12-14 16:24:07 UTC
Fixed with xwayland 1.19.0.