From 0804cefbeed8ce708aa163dbdf3e50b07bcabe48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 15 Jun 2012 15:52:47 +0200 Subject: [PATCH] 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 file changed, 4 insertions(+), 11 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 25626fc5e..e00a86c0b 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() {