diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 75be4c53b..31b7d2dfe 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -254,6 +254,8 @@ const WorkspaceTracker = new Lang.Class({ if (removingCurrentWorkspace) { // "Merge" the empty workspace we are removing with the one at the end this._wm.blockAnimations(); + global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time()); + this._wm.unblockAnimations(); } // Delete other empty workspaces; do it from the end to avoid index changes @@ -262,11 +264,6 @@ const WorkspaceTracker = new Lang.Class({ global.screen.remove_workspace(this._workspaces[i], global.get_current_time()); } - if (removingCurrentWorkspace) { - global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time()); - this._wm.unblockAnimations(); - } - this._checkWorkspacesId = 0; return false; },