[gnome-shell] workspace: Minor cleanup



commit 0804cefbeed8ce708aa163dbdf3e50b07bcabe48
Author: Florian MÃllner <fmuellner gnome org>
Date:   Fri Jun 15 15:52:47 2012 +0200

    workspace: Minor cleanup
    
    _hideAllOverlays() has only been used in a single place for quite
    some time now, so move its code into the caller and save a loop.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678416

 js/ui/workspace.js |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 25626fc..e00a86c 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1121,15 +1121,6 @@ const Workspace = new Lang.Class({
         }
     },
 
-    _hideAllOverlays: function() {
-        for (let i = 0; i < this._windows.length; i++) {
-            let clone = this._windows[i];
-            let overlay = this._windowOverlays[i];
-            if (overlay)
-                overlay.hide();
-        }
-    },
-
     _delayedWindowRepositioning: function() {
         if (this._windowIsZooming)
             return true;
@@ -1329,6 +1320,10 @@ const Workspace = new Lang.Class({
         // Position and scale the windows.
         for (let i = 0; i < this._windows.length; i++) {
             let clone = this._windows[i];
+            let overlay = this._windowOverlays[i];
+
+            if (overlay)
+                overlay.hide();
 
             clone.zoomFromOverview();
 
@@ -1353,8 +1348,6 @@ const Workspace = new Lang.Class({
                                  });
             }
         }
-
-        this._hideAllOverlays();
     },
 
     destroy : function() {



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