GNOME Bugzilla – Bug 780621
Native wayland applications temporarily loose focus on keyboard layout change with super+space
Last modified: 2021-07-05 13:50:01 UTC
This is not a duplicate of bug #700316, becase that bug is about X11 session, this one is about Wayland. But this bug very similar. When I press Super+Space key combination, the current window appears to lose focus and regain it instantly. For example, this works with Epiphany window or Gnome-terminal window. To reproduce, try this site in epiphany browser: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onblur Type some lowercase letters in the input field, than change the layout using default Super+space key combination. The letters will be transformed to the uppercase. The bug is not reproducible with Firefox, or Chromium, or Konsole. So I think, XWayland applications are not affected. There is no such a bug, if the key combination to change the layout is defined by gnome-tweak-tool, like it is set to Caps Lock or Alt+Shift in "switching to another layout" section.
It's not implemented in gnome-settings-daemon.
What actual issues does this cause? I mean, during layout switching, the application does not have keyboard focus, the layout switching popup has.
(In reply to Jonas Ådahl from comment #2) > What actual issues does this cause? I mean, during layout switching, the > application does not have keyboard focus, the layout switching popup has. Yes, the application loose focus, and not only the keyboard. For a web browser, for example, it triggers "onblur" event, that is often use as the "end of editing" on many sites.
Sounds like a duplicate of bug 687862.
(In reply to Florian Müllner from comment #4) > Sounds like a duplicate of bug 687862. That bug is obviously about X11 session (year 2012), not Wayland session. But maybe the root of the bug is the same, still.
(In reply to Ben Aceler from comment #5) > That bug is obviously about X11 session (year 2012), not Wayland session. Yes, but the the issue is only about wayland insofar as switching to wayland hasn't changed anything about global shortcuts temporarily taking keyboard focus away from applications.
(In reply to Florian Müllner from comment #6) > (In reply to Ben Aceler from comment #5) > > That bug is obviously about X11 session (year 2012), not Wayland session. > > Yes, but the the issue is only about wayland insofar as switching to wayland > hasn't changed anything about global shortcuts temporarily taking keyboard > focus away from applications. Well, it is not completely the same thing. In X11 session, focus can be stolen by any keyboard layout key combination. In Wayland, it is only works for Super+space combination, which is set by keyboard properties, but not gnome-tweak-tool. Also, in Wayland, XWayland applications are not affected. But you are the developer, of course :-)
(In reply to Florian Müllner from comment #6) > (In reply to Ben Aceler from comment #5) > > That bug is obviously about X11 session (year 2012), not Wayland session. > > Yes, but the the issue is only about wayland insofar as switching to wayland > hasn't changed anything about global shortcuts temporarily taking keyboard > focus away from applications. GNOME on X.org: Focus lost when super key pressed. GNOME on Wayland: Focus lost when keyboard layout switched or when layouts list popup appears (I think that the window always created, but not always have time to appears on screen). Windows loose focus when Alt+Tab is pressed (before I release keys) also. I thing it is wrong: I can press Tab twice (or more) and return to initial window and window should not know that I made mistype Alt+~ instead of Alt+1 for example. Nautilus also had to use popover "File/Folder rename" as workaround for this bug. This kind of popups must grab keyboard/mouse input but not steal focus from other windows. XWayland applications works like they should: Nor meta nor Alt+Tab does not affects window focus until it realy must be lost. This bug is wider and cover more cases, not olnly "super+space as kbd layout switcher"
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.