[gnome-shell] MessageTray: be explicit about removing tweens
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] MessageTray: be explicit about removing tweens
- Date: Thu, 22 Nov 2012 20:36:27 +0000 (UTC)
commit 81cd1e6c405e087b122cffe474902c069055092c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Nov 22 21:28:54 2012 +0100
MessageTray: be explicit about removing tweens
Turns out that tweener has a very complex logic to decide when a new
tween on the same properties overrides completely the old, and unfortunately
what we were doing was not enough in all cases.
Just be explicit, and don't let anything else mess with the state.
https://bugzilla.gnome.org/show_bug.cgi?id=688895
js/ui/messageTray.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 266759b..061135a 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2365,6 +2365,7 @@ const MessageTray = new Lang.Class({
}
if (this._notificationRemoved) {
+ Tweener.removeTweens(this._notificationWidget);
this._notificationWidget.y = this.actor.height;
this._notificationWidget.opacity = 0;
this._notificationState = State.HIDDEN;
@@ -2428,10 +2429,10 @@ const MessageTray = new Lang.Class({
if (this._notificationWidget.y < expandedY) {
this._notificationWidget.y = expandedY;
} else if (this._notification.y != expandedY) {
+ // Remove any other tween that could mess with the state machine
+ Tweener.removeTweens(this._notificationWidget);
// 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.
+ // currently hiding the notification.
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
{ y: expandedY,
opacity: 255,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]