screenShield: Fix unlock animation

When unlocking succeeds, the transition back to the user session is
animated. However, commit 8cf9baa1 broke the transition by hiding the
actor before starting the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=684591
This commit is contained in:
Florian Müllner 2012-09-22 00:06:26 +02:00
parent c13a573792
commit 0c8a94beb8

View File

@ -429,6 +429,7 @@ const ScreenShield = new Lang.Class({
this._hasLockScreen = false; this._hasLockScreen = false;
this._isGreeter = false; this._isGreeter = false;
this._isActive = false; this._isActive = false;
this._inUnlockAnimation = false;
this._lightbox = new Lightbox.Lightbox(Main.uiGroup, this._lightbox = new Lightbox.Lightbox(Main.uiGroup,
{ inhibitEvents: true, { inhibitEvents: true,
@ -766,6 +767,7 @@ const ScreenShield = new Lang.Class({
}, },
_tweenUnlocked: function() { _tweenUnlocked: function() {
this._inUnlockAnimation = true;
this.unlock(); this.unlock();
Tweener.addTween(this._lockDialogGroup, { Tweener.addTween(this._lockDialogGroup, {
scale_x: 0, scale_x: 0,
@ -778,6 +780,7 @@ const ScreenShield = new Lang.Class({
this._dialog = null; this._dialog = null;
} }
this.actor.hide(); this.actor.hide();
this._inUnlockAnimation = false;
}, },
onCompleteScope: this onCompleteScope: this
}); });
@ -799,7 +802,8 @@ const ScreenShield = new Lang.Class({
this._isModal = false; this._isModal = false;
} }
this.actor.hide(); if (!this._inUnlockAnimation)
this.actor.hide();
if (Main.sessionMode.currentMode == 'lock-screen') if (Main.sessionMode.currentMode == 'lock-screen')
Main.sessionMode.popMode('lock-screen'); Main.sessionMode.popMode('lock-screen');