[gnome-shell] altTab: popModal before fading out



commit 1e366aa56e21fadf1ff7364821494abe54c1eb7f
Author: Dan Winship <danw gnome org>
Date:   Tue Mar 15 16:12:40 2011 -0400

    altTab: popModal before fading out
    
    This lets the user start typing in the newly-selected window right
    away, without any characters possibly getting eaten during the
    animation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644857

 js/ui/altTab.js     |   11 +++++++++--
 js/ui/ctrlAltTab.js |    1 +
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 46ab9a3..54a4567 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 ff926a4..65b0a80 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]