auto-move-windows: Never remove the active workspace

Follow core shell in never removing the active workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=728865
This commit is contained in:
Florian Müllner
2014-04-24 19:15:43 +02:00
parent d9b543c6e0
commit 80f49c2ed7
+1 -13
View File
@@ -133,13 +133,7 @@ function myCheckWorkspaces() {
}
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
let activeIsLast = activeWorkspaceIndex == global.screen.n_workspaces - 2;
let removingTrailWorkspaces = (emptyWorkspaces[activeWorkspaceIndex] &&
activeIsLast);
if (removingTrailWorkspaces) {
// "Merge" the empty workspace we are removing with the one at the end
this._wm.blockAnimations();
}
emptyWorkspaces[activeWorkspaceIndex] = false;
// Delete other empty workspaces; do it from the end to avoid index changes
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
@@ -149,12 +143,6 @@ function myCheckWorkspaces() {
break;
}
if (removingTrailWorkspaces) {
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
this._wm.unblockAnimations();
}
this._checkWorkspacesId = 0;
return false;
}