GNOME Bugzilla – Bug 699685
Keyboard shortcuts launch apps in background
Last modified: 2021-07-05 14:20:14 UTC
I have the KDE Terminal "konsole" bound to a key in the settings on keyboard shortcuts. Hitting that shortcut reliably launches Konsole in the background. I think it's reasonable to assume that users launch applications because they'd like to interact with them, so giving a keyboard-launched app focus seems like a safe bet.
Still broken on 3.10
And also broken on 3.12. Easily reproducible.
FWIW, if I have a shortcut for launching gnome-terminal, and it reliably has focus when launched. I bet this is a duplicate of bug #732762. How does the shell decide whether or not to focus the main window when an app is launched?
See https://git.gnome.org/browse/mutter/tree/src/core/window.c#n1982
I have the same problem launching Empathy using a keyboard shortcut, which makes initiating an IM chat without using the mouse more cumbersome than it ought to be.
(In reply to comment #4) > See https://git.gnome.org/browse/mutter/tree/src/core/window.c#n1982 So the low-level "why" this happens is "It's a Feature" (i.e. an explicit behavior in the code). Does anyone else think that this behavior needs some modification in order to accommodate people launching programs because they intend to immediately use them? It makes it pretty hard to use my system where my workflow includes the frequent opening of new terminal windows. (I'm focusing on the terminal case because my only two hotkeys are for Firefox and Konsole and for whatever reason Firefox seems to always work and Konsole only sometimes works. I think the pattern is that it works when there are no other Konsoles open, and doesn't work when there is one somewhere else that doesn't have the focus)
The answer is that it's a feature known as "focus stealing prevention". There might be a bug in our implementation of the feature, or in Firefox's implementation of the feature, or in Konsole's implementation of the feature, or in all three.
(In reply to comment #7) > The answer is that it's a feature known as "focus stealing prevention". There > might be a bug in our implementation of the feature, or in Firefox's > implementation of the feature, or in Konsole's implementation of the feature, > or in all three. Unless there's a way to completely disable focus stealing prevention, do you have any suggestions for how to proceed with figuring out what the actual issue is (or a workaround)?
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/gnome-shell/-/issues/ Thank you for your understanding and your help.