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 780621 - Native wayland applications temporarily loose focus on keyboard layout change with super+space
Native wayland applications temporarily loose focus on keyboard layout change...
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-27 21:36 UTC by Ben Aceler
Modified: 2021-07-05 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ben Aceler 2017-03-27 21:36:36 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.
Comment 1 Bastien Nocera 2017-03-28 08:22:37 UTC
It's not implemented in gnome-settings-daemon.
Comment 2 Jonas Ådahl 2017-03-28 08:33:28 UTC
What actual issues does this cause? I mean, during layout switching, the application does not have keyboard focus, the layout switching popup has.
Comment 3 Ben Aceler 2017-03-28 17:18:18 UTC
(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.
Comment 4 Florian Müllner 2017-03-28 17:28:49 UTC
Sounds like a duplicate of bug 687862.
Comment 5 Ben Aceler 2017-03-28 17:37:08 UTC
(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.
Comment 6 Florian Müllner 2017-03-28 17:41:32 UTC
(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.
Comment 7 Ben Aceler 2017-03-28 18:01:24 UTC
(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 :-)
Comment 8 Andrey 2017-04-03 13:43:05 UTC
(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"
Comment 9 GNOME Infrastructure Team 2021-07-05 13:50:01 UTC
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.