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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user