[gnome-shell] AppMenu: remove tweens before animating the actor visibility



commit 15cfb9d1d9f633935ddeb247ba84b8f11770d81d
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Tue Sep 10 09:53:33 2013 +0200

    AppMenu: remove tweens before animating the actor visibility
    
    When we show(), we need to make sure that the hiding animation
    doesn't reach the end, otherwise we would hide the actor but
    still have _visible = true.
    We were relying on tweener overwriting to do this, but it
    doesn't quite work, so better be explicit and do it ourselves.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707814

 js/ui/panel.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index c6c1abc..ec12caa 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -249,6 +249,7 @@ const AppMenuButton = new Lang.Class({
         this._visible = true;
         this.actor.reactive = true;
         this.actor.show();
+        Tweener.removeTweens(this.actor);
         Tweener.addTween(this.actor,
                          { opacity: 255,
                            time: Overview.ANIMATION_TIME,
@@ -261,6 +262,7 @@ const AppMenuButton = new Lang.Class({
 
         this._visible = false;
         this.actor.reactive = false;
+        Tweener.removeTweens(this.actor);
         Tweener.addTween(this.actor,
                          { opacity: 0,
                            time: Overview.ANIMATION_TIME,


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