diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-03-01 13:58:13 +0100 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2023-03-19 23:20:09 +0100 |
commit | 72b2d199a30f14c132df2574c1085241a46c6758 (patch) | |
tree | a60c5c6282af9f6f0db30f89ca3acaa53534f33b | |
parent | 14a24886f6ca9359e3d020c32fc8fc4e91c87719 (diff) | |
download | mutter-72b2d199a30f14c132df2574c1085241a46c6758.tar.gz |
core: Avoid focusing windows on map during grabs
Normally, mutter implicitly allows a window being shown to take
focus. This is normally desired, except it steals input from
GNOME Shell self. Avoid focusing the just shown window in those
situations.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2878>
(cherry picked from commit 3ac82a58c51a5c8db6b49e89a1232f99c79644cc)
-rw-r--r-- | src/core/window.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c index 956a77d0c..ad6083c8b 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2003,6 +2003,15 @@ window_state_on_map (MetaWindow *window, return; } + /* Do not focus window on map if input is already taken by the + * compositor. + */ + if (!meta_display_windows_are_interactable (window->display)) + { + *takes_focus = FALSE; + return; + } + /* Terminal usage may be different; some users intend to launch * many apps in quick succession or to just view things in the new * window while still interacting with the terminal. In that case, |