[gnome-shell] Don't show the overview unless removing the workspace
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Don't show the overview unless removing the workspace
- Date: Sat, 12 Mar 2011 00:21:24 +0000 (UTC)
commit 8a28022a6bafe6f19b16077f418185d3546e7220
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Fri Mar 11 18:37:40 2011 -0500
Don't show the overview unless removing the workspace
Don't enter the overview at startup, or when we we remove the
last window on the first workspace, but only when we remove a
workspace and there are windows on the other workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=644541
js/ui/main.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index a57ba24..24dab31 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -263,9 +263,13 @@ function _checkWorkspaces() {
}
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
- let currentWorkspaceEmpty = emptyWorkspaces[activeWorkspaceIndex];
+ let removingCurrentWorkspace = (emptyWorkspaces[activeWorkspaceIndex] &&
+ activeWorkspaceIndex < emptyWorkspaces.length - 1);
+ // Don't enter the overview when removing multiple empty workspaces at startup
+ let showOverview = (removingCurrentWorkspace &&
+ !emptyWorkspaces.every(function(x) { return x; }));
- if (currentWorkspaceEmpty) {
+ if (removingCurrentWorkspace) {
// "Merge" the empty workspace we are removing with the one at the end
wm.blockAnimations();
}
@@ -276,11 +280,11 @@ function _checkWorkspaces() {
global.screen.remove_workspace(_workspaces[i], global.get_current_time());
}
- if (currentWorkspaceEmpty) {
+ if (removingCurrentWorkspace) {
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
wm.unblockAnimations();
- if (!overview.visible)
+ if (!overview.visible && showOverview)
overview.show();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]