summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-02-05 11:37:09 +0100
committerFlorian Müllner <fmuellner@gnome.org>2018-02-05 13:57:45 +0100
commit153719de86df3fdecad93d2b000d4e621d4a881c (patch)
tree59e82a436ab8c07866e4d98c3d46ebcacf6213a8
parentfd034f37242d855bc60de826c230e0c5482528d3 (diff)
downloadgnome-shell-wip/fmuellner/skip-lock-state-saving-on-wayland.tar.gz
screenShield: Do not save lock state on waylandwip/fmuellner/skip-lock-state-saving-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
-rw-r--r--js/ui/screenShield.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 9f3ff84ad..4bfde3e80 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -1283,7 +1283,10 @@ var ScreenShield = new Lang.Class({
this._resetLockScreen({ animateLockScreen: animate,
fadeToBlack: true });
- global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', 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));
// We used to set isActive and emit active-changed here,
// but now we do that from lockScreenShown, which means