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
This commit is contained in:
Marco Trevisan (Treviño) 2019-05-02 13:57:02 -05:00
parent 81ae886dda
commit ee4bb2240b

View File

@ -529,7 +529,11 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
meta_workspace_index (workspace)); meta_workspace_index (workspace));
if (workspace->manager->active_workspace == 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 /* Free any cached pointers to the workspaces's edges from
* a current resize or move operation */ * a current resize or move operation */