screenShield: Do not save lock state on wayland
We keep track of the lock state and restore it on startup to prevent a crash from bypassing the screen lock. However on wayland, a crash doesn't result in gnome-session restarting gnome-shell, but brings down the entire session - that is, restoring the lock state does not actually protect the existing session in that case, but forces the user to authenticate twice in order to start the next session. This is clearly not helpful, so avoid this by not saving the state when running as wayland compositor. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/17
This commit is contained in:
parent
80ad471812
commit
d3a3b7f514
@ -1283,6 +1283,9 @@ var ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
this._resetLockScreen({ animateLockScreen: animate,
|
this._resetLockScreen({ animateLockScreen: animate,
|
||||||
fadeToBlack: true });
|
fadeToBlack: true });
|
||||||
|
// On wayland, a crash brings down the entire session, so we don't
|
||||||
|
// need to defend against being restarted unlocked
|
||||||
|
if (!Meta.is_wayland_compositor())
|
||||||
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
|
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
|
||||||
|
|
||||||
// We used to set isActive and emit active-changed here,
|
// We used to set isActive and emit active-changed here,
|
||||||
|
Loading…
Reference in New Issue
Block a user