[gnome-shell] messageTray: Set the state to SHOWN when the notification is updated



commit c675c93733212da206538a297a76983238f684df
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Mar 12 17:59:40 2014 -0400

    messageTray: Set the state to SHOWN when the notification is updated
    
    If the notification is updated while SHOWING, we'll overwrite the
    tween updating it to the new 'y' position, but forget to update the
    state to SHOWN at the end of our transition. Make sure to always set
    the state to SHOWN at the end.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704844

 js/ui/messageTray.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 0cf3389..70b6fc3 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2790,7 +2790,12 @@ const MessageTray = new Lang.Class({
                              { y: expandedY,
                                opacity: 255,
                                time: ANIMATION_TIME,
-                               transition: 'easeOutQuad'
+                               transition: 'easeOutQuad',
+                               // HACK: Drive the state machine here better,
+                               // instead of overwriting tweens
+                               onComplete: Lang.bind(this, function() {
+                                   this._notificationState = State.SHOWN;
+                               }),
                              });
         }
     },


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