diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 46ab9a325..54a456706 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -376,7 +376,15 @@ AltTabPopup.prototype = { this.destroy(); }, + _popModal: function() { + if (this._haveModal) { + Main.popModal(this.actor); + this._haveModal = false; + } + }, + destroy : function() { + this._popModal(); if (this.actor.visible) { Tweener.addTween(this.actor, { opacity: 0, @@ -392,8 +400,7 @@ AltTabPopup.prototype = { }, _onDestroy : function() { - if (this._haveModal) - Main.popModal(this.actor); + this._popModal(); if (this._thumbnails) this._destroyThumbnails(); diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index ff926a476..65b0a8046 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -281,6 +281,7 @@ CtrlAltTabPopup.prototype = { }, _onDestroy : function() { + this._popModal(); if (this._keyPressEventId) this.actor.disconnect(this._keyPressEventId); if (this._keyReleaseEventId)