MessageTray: remove all tweens when tweening for state parameters
MessageTray._tween sets the state variable to the in-progress value, so it must be sure that at the end of the animation the value will be the corresponding final and nothing else will happen in between. https://bugzilla.gnome.org/show_bug.cgi?id=683986
This commit is contained in:
parent
b0c6d44515
commit
1a27d7dfc0
@ -2108,6 +2108,8 @@ const MessageTray = new Lang.Class({
|
|||||||
params.onCompleteScope = this;
|
params.onCompleteScope = this;
|
||||||
params.onCompleteParams = [statevar, value, onComplete, onCompleteScope, onCompleteParams];
|
params.onCompleteParams = [statevar, value, onComplete, onCompleteScope, onCompleteParams];
|
||||||
|
|
||||||
|
// Remove other tweens that could mess with the state machine
|
||||||
|
Tweener.removeTweens(actor);
|
||||||
Tweener.addTween(actor, params);
|
Tweener.addTween(actor, params);
|
||||||
|
|
||||||
let valuing = (value == State.SHOWN) ? State.SHOWING : State.HIDING;
|
let valuing = (value == State.SHOWN) ? State.SHOWING : State.HIDING;
|
||||||
@ -2429,8 +2431,6 @@ const MessageTray = new Lang.Class({
|
|||||||
if (this._notificationWidget.y < expandedY) {
|
if (this._notificationWidget.y < expandedY) {
|
||||||
this._notificationWidget.y = expandedY;
|
this._notificationWidget.y = expandedY;
|
||||||
} else if (this._notification.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
|
// Tween also opacity here, to override a possible tween that's
|
||||||
// currently hiding the notification.
|
// currently hiding the notification.
|
||||||
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
|
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
|
||||||
|
Loading…
Reference in New Issue
Block a user