diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 9f692f4aa..0317973e8 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -304,6 +304,9 @@ var WindowList = class WindowList { } _updateWindowList() { + if (!this._lookingGlass.isOpen) + return; + this.actor.destroy_all_children(); let windows = global.get_window_actors(); let tracker = Shell.WindowTracker.get_default(); @@ -335,6 +338,10 @@ var WindowList = class WindowList { } } } + + update() { + this._updateWindowList(); + } }; Signals.addSignalMethods(WindowList.prototype); @@ -1099,6 +1106,8 @@ var LookingGlass = class LookingGlass { duration, mode: Clutter.AnimationMode.EASE_OUT_QUAD }); + + this._windowList.update(); } close() { @@ -1124,5 +1133,9 @@ var LookingGlass = class LookingGlass { onComplete: () => this.actor.hide() }); } + + get isOpen() { + return this._open; + } }; Signals.addSignalMethods(LookingGlass.prototype);