[gnome-shell] screenShield: Do not take an inhibitor when disabled by lockdown
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenShield: Do not take an inhibitor when disabled by lockdown
- Date: Mon, 20 Mar 2017 18:14:15 +0000 (UTC)
commit a786f0bcd2087a34694d67da157fdfea7f98ce47
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Mar 17 15:48:22 2017 +0100
screenShield: Do not take an inhibitor when disabled by lockdown
Just as with the normal lock screen settings, we shouldn't request
a logind inhibitor when locking is disabled via lockdown settings.
https://bugzilla.gnome.org/show_bug.cgi?id=780212
js/ui/screenShield.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index fd21fde..fd4f28c 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -545,6 +545,7 @@ const ScreenShield = new Lang.Class({
this._settings.connect('changed::' + LOCK_ENABLED_KEY, Lang.bind(this, this._syncInhibitor));
this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
+ this._lockSettings.connect('changed::' + DISABLE_LOCK_KEY, Lang.bind(this, this._syncInhibitor));
this._isModal = false;
this._hasLockScreen = false;
@@ -706,8 +707,10 @@ const ScreenShield = new Lang.Class({
},
_syncInhibitor: function() {
+ let lockEnabled = this._settings.get_boolean(LOCK_ENABLED_KEY);
+ let lockLocked = this._lockSettings.get_boolean(DISABLE_LOCK_KEY);
let inhibit = (this._loginSession && this._loginSession.Active &&
- !this._isActive && this._settings.get_boolean(LOCK_ENABLED_KEY));
+ !this._isActive && lockEnabled && !lockLocked);
if (inhibit) {
this._loginManager.inhibit(_("GNOME needs to lock the screen"),
Lang.bind(this, function(inhibitor) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]