GNOME Bugzilla – Bug 752165
unable to toggle languages when running gnome under wayland
Last modified: 2015-11-23 15:50:30 UTC
I logged in to gnome using wayland as window server. I then tried to toggle between Hebrew and English, and failed. Only English works.
Can you go through the steps you used to change your language, and what you saw as the result?
sure. How to reproduce: Login using gnome with X 1. configure two or more languages in gnome. 2. configure a toggle key, i use CAPS or alt-shift. 3. switch languages using the keys selected in step 2. 4. It works! 5. logout 6. Login using gnome with wayland 7. switch languages using the keys selected in step 2. 8. It Doesn't work!
So you're talking about switching input methods or keyboard layouts here, not about choosing which language strings are localized into. OK. Does Super+Space work? It could just be an issue with the mods-only bindings here.
Thank you, no, that doesn't work either.
I can switch between different input methods in GNOME Wayland. One issue though that I have been looking at is that it takes two changes for the change to take effect for X11 clients. The same thing seems to happen in weston though, so I don't think its GNOME specific. In other words, to change from US to SE, I need to "change" to SE twice. Can you check whether this is the case? In other words, try this: 1. Switch to language 1 (with Super+Space) 2. Switch to language 2 (with Super+Space) 3. Switch to language 2 again (with Super+Space, without switching to language 1 in between) and between every step, check what keyboard layout is active in Wayland clients and X11 clients.
If this only happens on X11 clients then it's probably an Xwayland bug which I had a patch to fix but never got much support and didn't get merged: http://lists.x.org/archives/xorg-devel/2014-July/043080.html The real fix is a complete overhaul of Xwayland's keyboard input to avoid going through the XKB machinery.
(In reply to Rui Matos from comment #6) > If this only happens on X11 clients then it's probably an Xwayland bug which > I had a patch to fix but never got much support and didn't get merged: > > http://lists.x.org/archives/xorg-devel/2014-July/043080.html > > The real fix is a complete overhaul of Xwayland's keyboard input to avoid > going through the XKB machinery. Is it really the same issue? The issue I'm seeing is that the keymap is incorrect (Xwayland needs to wl_keyboard.keymap events for the change to take effect or something like that). How is that related to incorrect modifier state which AFAICS is what the patch you link to is about?
(In reply to Jonas Ådahl from comment #7) > The issue I'm seeing is that the keymap is incorrect (Xwayland needs to > wl_keyboard.keymap events for the change to take effect or something like > that). How is that related to incorrect modifier state which AFAICS is what > the patch you link to is about? Not sure it's the same issue. But note that the current layout is determined by the so called group index (aka xkb_layout_index_t in libxkbcommon) which is part of the modifier state.
(In reply to Rui Matos from comment #8) > (In reply to Jonas Ådahl from comment #7) > > The issue I'm seeing is that the keymap is incorrect (Xwayland needs to > > wl_keyboard.keymap events for the change to take effect or something like > > that). How is that related to incorrect modifier state which AFAICS is what > > the patch you link to is about? > > Not sure it's the same issue. But note that the current layout is determined > by the so called group index (aka xkb_layout_index_t in libxkbcommon) which > is part of the modifier state. I think it is this issue. Debugging shows that the mutter sends the right group, but Xwayland is not updating it. Unconditionally updating the group index on any modifiers event fixes the issue for me.
Created attachment 307974 [details] [review] Fix changing the layout on x11 backend Just part of the fix - on X11 backend switching layouts does not work at all (no matter if the client is X11 or Wayland). With this patch, the X11 and native backends will work the same, only the Xwayland part of fix left.
(In reply to Marek Chalupa from comment #10) > Created attachment 307974 [details] [review] [review] > Fix changing the layout on x11 backend > > Just part of the fix - on X11 backend switching layouts does not work at all > (no matter if the client is X11 or Wayland). With this patch, the X11 and > native backends will work the same, only the Xwayland part of fix left. Does this fix anything for you? See https://git.gnome.org/browse/mutter/commit/?id=59c5ac0cb57769ed635372e17deddafcbe3a4589 for why this isn't needed.
(In reply to Rui Matos from comment #11) > (In reply to Marek Chalupa from comment #10) > > Created attachment 307974 [details] [review] [review] [review] > > Fix changing the layout on x11 backend > > > > Just part of the fix - on X11 backend switching layouts does not work at all > > (no matter if the client is X11 or Wayland). With this patch, the X11 and > > native backends will work the same, only the Xwayland part of fix left. > > Does this fix anything for you? See > https://git.gnome.org/browse/mutter/commit/ > ?id=59c5ac0cb57769ed635372e17deddafcbe3a4589 for why this isn't needed. Sorry, the commit message is a little bit wrong. I meant when running gnome-shell --wayland on clutter X11 backend, as a nested X11 client.
*** Bug 754537 has been marked as a duplicate of this bug. ***
As my bug was marked as a duplicate of this one, I will paste here results of my testing (with gnome-shell 3.17.90). I use CapsLock as a modifier-only shortcut to switch layouts. * When I press CapsLock, the indicator updates correctly. * Native Wayland clients correctly update the layouts. * The problem is only with XWayland clients, which keep using the previous layout. * If I change the layout using the indicator drop-down menu, or using switch-input-source shortcut (i.e. Super+Space), it works fine even for XWayland clients. So only modifier-only switching is broken. This is with gnome-shell 3.17.90, xwayland 1.17.2.
Seeing the same behavior here as Dimitry. gnome-shell 3.18.2, xwayland 1.17.2
(In reply to Jens Georg from comment #15) > Seeing the same behavior here as Dimitry. > > gnome-shell 3.18.2, xwayland 1.17.2 It should be fixed in xwayland >= 1.18.0 . Can one of you confirm?
Running 1.18.0 on Arch, can confirm I'm not experiencing the bug.
Thanks, closing. Feel free to re-open if you can still reproduce with xwayland >= 1.18.0