[gnome-shell/gnome-3-10] windowManager: Activate new workspace before removing the current one
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-10] windowManager: Activate new workspace before removing the current one
- Date: Wed, 19 Feb 2014 20:18:26 +0000 (UTC)
commit 0dab133fe578b3b12241ce6f01b58bc755088da8
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Sep 30 19:55:26 2013 +0200
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
js/ui/windowManager.js | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
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;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]