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



commit 98a437c38dfa4dc916dead10e7e1b00241466c12
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 dc125c213..75a5a5b21 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -943,7 +943,10 @@ var LoginDialog = GObject.registerClass({
     _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]