[gnome-shell/eos3.8: 234/255] screenShield: Don't inhibit suspend during initial setup



commit 97de4cb6c7f4db99886753ac146016e58b349cf3
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
    (cherry picked from commit a60d57ea1fc083940e3eea206c74d547e17c9bb6)
    (cherry picked from commit 69c27036d75ff946c0fbf4e3d7dd969dad5494b1)

 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 1d5521dc4f..4879ff2887 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -249,7 +249,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]