diff --git a/windowPreview.js b/windowPreview.js index 6dd0f96..71f380d 100644 --- a/windowPreview.js +++ b/windowPreview.js @@ -325,7 +325,7 @@ var PreviewMenu = Utils.defineClass({ let l = Math.max(windows.length, currentPreviews.length); for (let i = 0; i < l; ++i) { - if (currentPreviews[i] && windows[i] && windows[i] != currentPreviews[i].window) { + if (currentPreviews[i] && windows[i]) { currentPreviews[i].assignWindow(windows[i], this.opened); } else if (!currentPreviews[i]) { this._addNewPreview(windows[i]); @@ -346,7 +346,6 @@ var PreviewMenu = Utils.defineClass({ if (currentIndex < 0) { this._addNewPreview(windows[i]); } else { - currentPreviews[currentIndex].cancelAnimateOut(); currentPreviews[currentIndex].assignWindow(windows[i]); currentPreviews.splice(currentIndex, 1); @@ -819,6 +818,7 @@ var Preview = Utils.defineClass({ _assignWindowClone(); } + this._cancelAnimateOut(); this._removeWindowSignals(); this.window = window; this._needsCloseButton = window.can_close() && !Utils.checkIfWindowHasTransient(window); @@ -836,15 +836,6 @@ var Preview = Utils.defineClass({ } }, - cancelAnimateOut: function() { - if (this.animatingOut) { - this.animatingOut = false; - - Utils.stopAnimations(this); - Utils.animate(this, getTweenOpts({ opacity: 255 })); - } - }, - getSize: function() { let [binWidth, binHeight] = this._getBinSize(); @@ -911,6 +902,15 @@ var Preview = Utils.defineClass({ return Clutter.EVENT_STOP; }, + _cancelAnimateOut: function() { + if (this.animatingOut) { + this.animatingOut = false; + + Utils.stopAnimations(this); + Utils.animate(this, getTweenOpts({ opacity: 255, width: this.cloneWidth, height: this.cloneHeight })); + } + }, + _showContextMenu: function(e) { let coords = e.get_coords(); let currentWorkspace = this._previewMenu.peekInitialWorkspaceIndex < 0 ?