screenShield: Don't fade in the lock dialog
We slide the shield over it, so the animation is rarely seen, and since no other actor is under the lock screen, the not-cleared stage can show through, causing weird issues when trying to blend. https://bugzilla.gnome.org/show_bug.cgi?id=706841
This commit is contained in:
parent
897c5634b0
commit
b7b1260540
@ -52,12 +52,10 @@ const SUMMARY_ICON_SIZE = 48;
|
|||||||
// or when cancelling the dialog
|
// or when cancelling the dialog
|
||||||
// - BACKGROUND_FADE_TIME is used when the background changes to crossfade to new background
|
// - BACKGROUND_FADE_TIME is used when the background changes to crossfade to new background
|
||||||
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
||||||
// - INITIAL_FADE_IN_TIME is used for the initial fade in at startup
|
|
||||||
const STANDARD_FADE_TIME = 10;
|
const STANDARD_FADE_TIME = 10;
|
||||||
const MANUAL_FADE_TIME = 0.3;
|
const MANUAL_FADE_TIME = 0.3;
|
||||||
const BACKGROUND_FADE_TIME = 1.0;
|
const BACKGROUND_FADE_TIME = 1.0;
|
||||||
const CURTAIN_SLIDE_TIME = 0.3;
|
const CURTAIN_SLIDE_TIME = 0.3;
|
||||||
const INITIAL_FADE_IN_TIME = 0.25;
|
|
||||||
|
|
||||||
const Clock = new Lang.Class({
|
const Clock = new Lang.Class({
|
||||||
Name: 'ScreenShieldClock',
|
Name: 'ScreenShieldClock',
|
||||||
@ -520,16 +518,9 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
reactive: true,
|
reactive: true,
|
||||||
opacity: 0,
|
|
||||||
pivot_point: new Clutter.Point({ x: 0.5, y: 0.5 }),
|
pivot_point: new Clutter.Point({ x: 0.5, y: 0.5 }),
|
||||||
name: 'lockDialogGroup' });
|
name: 'lockDialogGroup' });
|
||||||
|
|
||||||
Tweener.addTween(this._lockDialogGroup,
|
|
||||||
{ opacity: 255,
|
|
||||||
time: INITIAL_FADE_IN_TIME,
|
|
||||||
transition: 'easeInQuad',
|
|
||||||
});
|
|
||||||
|
|
||||||
this.actor.add_actor(this._lockDialogGroup);
|
this.actor.add_actor(this._lockDialogGroup);
|
||||||
this.actor.add_actor(this._lockScreenGroup);
|
this.actor.add_actor(this._lockScreenGroup);
|
||||||
|
|
||||||
@ -995,7 +986,6 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
_onUnlockFailed: function() {
|
_onUnlockFailed: function() {
|
||||||
this._resetLockScreen({ animateLockScreen: true,
|
this._resetLockScreen({ animateLockScreen: true,
|
||||||
animateLockDialog: false,
|
|
||||||
fadeToBlack: false });
|
fadeToBlack: false });
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1035,17 +1025,6 @@ const ScreenShield = new Lang.Class({
|
|||||||
animateFade: false });
|
animateFade: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.animateLockDialog) {
|
|
||||||
this._lockDialogGroup.opacity = 0;
|
|
||||||
Tweener.removeTweens(this._lockDialogGroup);
|
|
||||||
Tweener.addTween(this._lockDialogGroup,
|
|
||||||
{ opacity: 255,
|
|
||||||
time: MANUAL_FADE_TIME,
|
|
||||||
transition: 'easeOutQuad' });
|
|
||||||
} else {
|
|
||||||
this._lockDialogGroup.opacity = 255;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._lockScreenGroup.grab_key_focus();
|
this._lockScreenGroup.grab_key_focus();
|
||||||
|
|
||||||
if (Main.sessionMode.currentMode != 'lock-screen')
|
if (Main.sessionMode.currentMode != 'lock-screen')
|
||||||
@ -1296,7 +1275,6 @@ const ScreenShield = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._resetLockScreen({ animateLockScreen: animate,
|
this._resetLockScreen({ animateLockScreen: animate,
|
||||||
animateLockDialog: animate,
|
|
||||||
fadeToBlack: true });
|
fadeToBlack: true });
|
||||||
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
|
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user