[gnome-shell/wip/timed-login-fix: 1/4] loginDialog: only reactivate dialog when session goes active



commit cbb35691ed3227e7cb173302c2b6ed90f9677eab
Author: Ray Strode <rstrode redhat com>
Date:   Wed Feb 6 15:51:05 2019 -0500

    loginDialog: only reactivate dialog when session goes active
    
    At the moment, we reactivate the login dialog any time any
    property on the logind session proxy changes and the VT
    is active.
    
    That means we sometimes reactivate the login screen even
    when the user isn't switching VTs to the login screen.
    
    This commit ensures that we only check if the session is
    active when the session activeness changes, and not when other
    logind session properties change.

 js/gdm/loginDialog.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 370590902..31483fe7d 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -946,7 +946,10 @@ var LoginDialog = new Lang.Class({
     _gotGreeterSessionProxy(proxy) {
         this._greeterSessionProxy = proxy;
         this._greeterSessionProxyChangedId =
-            proxy.connect('g-properties-changed', () => {
+            proxy.connect('g-properties-changed', (proxy, properties) => {
+                if (!('Active' in properties.deep_unpack()))
+                    return;
+
                 if (proxy.Active)
                     this._loginScreenSessionActivated();
             });


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