[mutter] workspace: Activate a window also if it's already in workspace



commit ee4bb2240b62ee39913a87164be8406acdc15e01
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu May 2 13:57:02 2019 -0500

    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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]