Block cancellation of the unlock dialog when dragging

Pressing esc while the mouse is down should not make the curtain fall,
otherwise a gray screen results.

https://bugzilla.gnome.org/show_bug.cgi?id=686800
This commit is contained in:
Giovanni Campagna
2012-10-24 17:53:19 +02:00
parent b59529e579
commit 4535a70f08
2 changed files with 13 additions and 7 deletions

View File

@ -174,6 +174,7 @@ const UnlockDialog = new Lang.Class({
this._workSpinner.actor.opacity = 0;
this._workSpinner.actor.show();
this.allowCancel = false;
this.buttonLayout.visible = true;
this.addButton({ label: _("Cancel"),
action: Lang.bind(this, this._escape),
@ -349,8 +350,10 @@ const UnlockDialog = new Lang.Class({
},
_escape: function() {
this._userVerifier.cancel();
this.emit('failed');
if (this.allowCancel) {
this._userVerifier.cancel();
this.emit('failed');
}
},
_otherUserClicked: function(button, event) {