File gnome-shell-activate-new-workspace-first.patch of Package gnome-shell.openSUSE_13.1_Update
From 0dab133fe578b3b12241ce6f01b58bc755088da8 Mon Sep 17 00:00:00 2001
From: Florian Müllner <fmuellner@gnome.org>
Date: Mon, 30 Sep 2013 17:55:26 +0000
Subject: windowManager: Activate new workspace before removing the current one
When removing the current workspace, the active workspace is changed
to the preceding one automatically before we change explicitly to the
last workspace. There is no good reason to change workspaces twice in
this case, we can avoid the first one just by changing to the new
workspace before removing any workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=709064
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 75be4c5..31b7d2d 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;
},
--
cgit v0.9.2