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

Conflicts:
	js/ui/screenShield.js
	js/ui/unlockDialog.js
This commit is contained in:
Giovanni Campagna
2012-10-24 17:53:19 +02:00
parent a2b8b969bd
commit 4007f5d36e
2 changed files with 13 additions and 7 deletions

View File

@ -164,6 +164,7 @@ const UnlockDialog = new Lang.Class({
this._promptLoginHint.hide();
this.contentLayout.add_actor(this._promptLoginHint);
this.allowCancel = false;
let cancelButton = { label: _("Cancel"),
action: Lang.bind(this, this._escape),
key: Clutter.KEY_Escape };
@ -291,8 +292,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) {