[gnome-shell] screenShield: Don't inhibit suspend during initial setup
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenShield: Don't inhibit suspend during initial setup
- Date: Fri, 24 Apr 2020 23:52:41 +0000 (UTC)
commit a60d57ea1fc083940e3eea206c74d547e17c9bb6
Author: Matthew Leeds <matthew leeds endlessm com>
Date: Fri Apr 24 14:42:52 2020 -0700
screenShield: Don't inhibit suspend during initial setup
Normally, we inhibit suspend while locking the screen. But in the
session mode used for gnome-initial-setup locking is not supported, so
in that case this inhibit call is pointless and should be avoided.
Without this patch you get the following error when you suspend and
resume during initial setup:
JS ERROR: Error getting systemd inhibitor: Gio.IOErrorEnum:
GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation
inhibition has been requested for is already running
_promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:435:45
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1213
js/ui/screenShield.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index ab75577fa9..b368162ce8 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -198,7 +198,7 @@ var ScreenShield = class {
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 && lockEnabled && !lockLocked;
+ !this._isActive && lockEnabled && !lockLocked && Main.sessionMode.unlockDialog;
if (inhibit) {
this._loginManager.inhibit(_("GNOME needs to lock the screen"),
inhibitor => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]