[gnome-shell/wip/timed-login-fix: 279/284] loginDialog: disconnect greeter when switching away VTs



commit 3454a39590e458a8a0dd84a256a095acf8720312
Author: Ray Strode <rstrode redhat com>
Date:   Wed Feb 6 15:59:31 2019 -0500

    loginDialog: disconnect greeter when switching away VTs
    
    At the moment the greeter stays connected to GDM even after the
    user logs in.  That stale connection can lead to bookkeeping
    confusion later on.
    
    This commit makes sure we disconnect the greeter connection any
    time the user logs in or otherwise switches VTs.
    
    This commit also make sure we do a full reset when VT switching
    back later, so the greeter connection can get re-setup.

 js/gdm/loginDialog.js | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 75a5a5b21..cb2a69ef8 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -917,9 +917,6 @@ var LoginDialog = GObject.registerClass({
     }
 
     _loginScreenSessionActivated() {
-        if (this.opacity == 255 && this._authPrompt.verificationStatus == 
AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
-            return;
-
         Tweener.addTween(this,
                          { opacity: 255,
                            time: _FADE_ANIMATION_TIME,
@@ -934,12 +931,18 @@ var LoginDialog = GObject.registerClass({
                            },
                            onUpdateScope: this,
                            onComplete() {
-                               if (this._authPrompt.verificationStatus != 
AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
-                                   this._authPrompt.reset();
+                               this._authPrompt.reset();
                            },
                            onCompleteScope: this });
     }
 
+    _loginScreenSessionDeactivated() {
+        if (this._greeter) {
+            this._greeter.run_dispose();
+            this._greeter = null;
+        }
+    }
+
     _gotGreeterSessionProxy(proxy) {
         this._greeterSessionProxy = proxy;
         this._greeterSessionProxyChangedId =
@@ -949,6 +952,8 @@ var LoginDialog = GObject.registerClass({
 
                 if (proxy.Active)
                     this._loginScreenSessionActivated();
+                else
+                    this._loginScreenSessionDeactivated();
             });
     }
 


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