From e38002b20691cd0fe90efc92971ad62321543e12 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 6 Dec 2022 00:56:31 +0100 Subject: [PATCH] workspace: Do not raise default focus window with raise-on-click This avoids raising a window when switching input methods or returning from the overview when it is unwanted with raise-on-click disabled. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2545 Part-of: --- src/core/workspace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/workspace.c b/src/core/workspace.c index dfdb6e1fb..2c091768e 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -1647,7 +1647,8 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace, if (try_to_set_focus_and_check (ancestor, not_this_one, timestamp)) { /* Also raise the window if in click-to-focus */ - if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK) + if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK && + meta_prefs_get_raise_on_click ()) meta_window_raise (ancestor); return; @@ -1664,7 +1665,8 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace, if (try_to_set_focus_and_check (window, not_this_one, timestamp)) { /* Also raise the window if in click-to-focus */ - if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK) + if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK && + meta_prefs_get_raise_on_click ()) meta_window_raise (window); return;