From 98a437c38dfa4dc916dead10e7e1b00241466c12 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 6 Feb 2019 15:51:05 -0500 Subject: [PATCH] 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(); });