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
This commit is contained in:
Florian Müllner 2012-06-15 15:52:47 +02:00
parent 2404d2935d
commit 0804cefbee

View File

@ -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() {