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.
This commit is contained in:
Ray Strode 2019-02-06 15:51:05 -05:00
parent 5ca039c1db
commit 98a437c38d

View File

@ -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();
});