[gnome-shell] ScreenShield: don't really deactivate when acting as a greeter



commit a8ea6c2c66256bc18aa67e05cf1a5a28a89bc16d
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Jun 6 22:09:28 2013 +0200

    ScreenShield: don't really deactivate when acting as a greeter
    
    In greeter mode, we don't want to hide the login dialog, drop the
    modal or send spurious signals to gnome-settings-daemon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701761

 js/ui/screenShield.js |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index ffe8762..4e61c11 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -1143,6 +1143,20 @@ const ScreenShield = new Lang.Class({
         if (Main.sessionMode.currentMode == 'unlock-dialog')
             Main.sessionMode.popMode('unlock-dialog');
 
+        if (this._isGreeter) {
+            // We don't want to "deactivate" any more than
+            // this. In particular, we don't want to drop
+            // the modal, hide ourselves or destroy the dialog
+            // But we do want to set isActive to false, so that
+            // gnome-session will reset the idle counter, and
+            // gnome-settings-daemon will stop blanking the screen
+
+            this._activationTime = 0;
+            this._isActive = false;
+            this.emit('active-changed');
+            return;
+        }
+
         if (this._dialog && !this._isGreeter)
             this._dialog.popModal();
 
@@ -1162,7 +1176,7 @@ const ScreenShield = new Lang.Class({
     },
 
     _completeDeactivate: function() {
-        if (this._dialog && !this._isGreeter) {
+        if (this._dialog) {
             this._dialog.destroy();
             this._dialog = null;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]