From b121c2518403bc5ea991b3f1c4b00188c8d590b4 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 19 Nov 2012 18:59:39 +0100 Subject: [PATCH] MessageTray: restore opacity when expanding a notification MessageTray tweens both opacity and y to hide or show _notificationWidget, but only y when expanding it. This means that an existing tween to hide the notification will continue running, clearing the notification state. If the hiding one completes before the showing one, the onComplete handler will throw an exception (because the notification was nullified) and therefore break the state tracking. https://bugzilla.gnome.org/show_bug.cgi?id=683986 --- js/ui/messageTray.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 50fd3b4ea..d69d31b9b 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2403,8 +2403,13 @@ const MessageTray = new Lang.Class({ if (this._notificationWidget.y < expandedY) { this._notificationWidget.y = expandedY; } else if (this._notification.y != expandedY) { + // Tween also opacity here, to override a possible tween that's + // currently hiding the notification. This will ensure that the + // notification is not removed when the onComplete handler for this + // one triggers. this._tween(this._notificationWidget, '_notificationState', State.SHOWN, { y: expandedY, + opacity: 255, time: ANIMATION_TIME, transition: 'easeOutQuad' });