loginDialog: Fix session button can be clicked

When session menu button is hidden, button can be clicked and show popup
menu.

https://bugzilla.gnome.org/show_bug.cgi?id=781482
This commit is contained in:
Xiaoguang Wang 2017-04-19 13:29:59 +08:00 committed by Ray Strode
parent 1508d76d32
commit fcbb942e24

View File

@ -775,10 +775,12 @@ const LoginDialog = new Lang.Class({
},
_onPrompted: function() {
if (this._shouldShowSessionMenuButton()) {
this._sessionMenuButton.updateSensitivity(true);
if (this._shouldShowSessionMenuButton())
this._authPrompt.setActorInDefaultButtonWell(this._sessionMenuButton.actor);
} else {
this._sessionMenuButton.updateSensitivity(false);
}
this._showPrompt();
},
@ -881,6 +883,7 @@ const LoginDialog = new Lang.Class({
}));
this._updateCancelButton();
this._sessionMenuButton.updateSensitivity(false);
this._authPrompt.updateSensitivity(true);
this._showPrompt();
},