From c675c93733212da206538a297a76983238f684df Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 12 Mar 2014 17:59:40 -0400 Subject: [PATCH] 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 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 0cf3389c4..70b6fc345 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; + }), }); } },