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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2742>
This commit is contained in:
Sebastian Wick 2022-12-06 00:56:31 +01:00 committed by Marge Bot
parent 7fecda6a7a
commit e38002b206

View File

@ -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;