From ee4bb2240b62ee39913a87164be8406acdc15e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 2 May 2019 13:57:02 -0500 Subject: [PATCH] workspace: Activate a window also if it's already in workspace meta_workspace_activate_with_focus is supposed to focus the passed window after switching the workspace. However if the passed workspace is already the active one, we just return without activating the window. So fix this calling meta_window_activate on the foucs_this window if that is valid. https://gitlab.gnome.org/GNOME/mutter/merge_requests/562 --- src/core/workspace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/workspace.c b/src/core/workspace.c index f2b2c2c48..5dbc86324 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -529,7 +529,11 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace, meta_workspace_index (workspace)); if (workspace->manager->active_workspace == workspace) - return; + { + if (focus_this) + meta_window_activate (focus_this, timestamp); + return; + } /* Free any cached pointers to the workspaces's edges from * a current resize or move operation */