[gnome-shell] [windowManager] Really fix state checking for workspace switcher popup



commit e21aea6e13f2d2f3cd1afdaf627a835d9d9e1fab
Author: Colin Walters <walters verbum org>
Date:   Thu Mar 18 14:53:58 2010 -0400

    [windowManager] Really fix state checking for workspace switcher popup
    
    To be correct just always check at time of use whether the overview
    is visible, rather than trying to use whether or not it was
    constructed earlier.

 js/ui/windowManager.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index ad8b21e..3405e98 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -315,7 +315,7 @@ WindowManager.prototype = {
         if (global.screen.n_workspaces == 1)
             return;
 
-        if (this._workspaceSwitcherPopup == null && !Main.overview.visible)
+        if (this._workspaceSwitcherPopup == null)
             this._workspaceSwitcherPopup = new WorkspaceSwitcherPopup.WorkspaceSwitcherPopup();
 
         if (binding == "switch_to_workspace_left") {
@@ -331,9 +331,9 @@ WindowManager.prototype = {
         let activeWorkspaceIndex = global.screen.get_active_workspace_index();
         if (activeWorkspaceIndex > 0) {
             global.screen.get_workspace_by_index(activeWorkspaceIndex - 1).activate(global.get_current_time());
-            if (this._workspaceSwitcherPopup != null)
+            if (!Main.overview.visible)
                 this._workspaceSwitcherPopup.display(WorkspaceSwitcherPopup.LEFT, activeWorkspaceIndex - 1);
-        } else if (this._workspaceSwitcherPopup != null){
+        } else if (!Main.overview.visible) {
             this._workspaceSwitcherPopup.display(WorkspaceSwitcherPopup.LEFT, activeWorkspaceIndex);
         }
     },
@@ -342,9 +342,9 @@ WindowManager.prototype = {
         let activeWorkspaceIndex = global.screen.get_active_workspace_index();
         if (activeWorkspaceIndex <  global.screen.n_workspaces - 1) {
             global.screen.get_workspace_by_index(activeWorkspaceIndex + 1).activate(global.get_current_time());
-            if (this._workspaceSwitcherPopup != null)
+            if (!Main.overview.visible)
                 this._workspaceSwitcherPopup.display(WorkspaceSwitcherPopup.RIGHT, activeWorkspaceIndex + 1);
-        } else if (this._workspaceSwitcherPopup != null) {
+        } else if (!Main.overview.visible) {
             this._workspaceSwitcherPopup.display(WorkspaceSwitcherPopup.RIGHT, activeWorkspaceIndex);
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]