[gnome-shell] panel: fix app menu visibility after quick overview visit



commit 43961aaca517f6d5dcd8816b7055f44ce17602cb
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Feb 16 15:17:46 2011 -0500

    panel: fix app menu visibility after quick overview visit
    
    If you left the overview immediately after entering it (either
    intentionally or due to a bug), the app menu would mistakenly end up
    hidden due to flaky interaction between its show() and hide() methods.
    
    Based on a patch by Dan Winship <danw gnome org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=641117

 js/ui/panel.js |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 1c32e86..f1a5e90 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -220,7 +220,7 @@ AppMenuButton.prototype = {
 
         this._visible = !Main.overview.visible;
         if (!this._visible)
-            this.hide();
+            this.actor.hide();
         Main.overview.connect('hiding', Lang.bind(this, function () {
             this.show();
         }));
@@ -255,28 +255,27 @@ AppMenuButton.prototype = {
         if (this._visible)
             return;
 
+        this._visible = true;
         this.actor.show();
+        Tweener.removeTweens(this.actor);
         Tweener.addTween(this.actor,
                          { opacity: 255,
                            time: Overview.ANIMATION_TIME,
-                           transition: 'easeOutQuad',
-                           onComplete: function() {
-                               this._visible = true;
-                           },
-                           onCompleteScope: this });
+                           transition: 'easeOutQuad' });
     },
 
     hide: function() {
         if (!this._visible)
             return;
 
+        this._visible = false;
+        Tweener.removeTweens(this.actor);
         Tweener.addTween(this.actor,
                          { opacity: 0,
                            time: Overview.ANIMATION_TIME,
                            transition: 'easeOutQuad',
                            onComplete: function() {
                                this.actor.hide();
-                               this._visible = false;
                            },
                            onCompleteScope: this });
     },



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