screenShield: Don't wait until the dialog is loaded before opening it
If we wait asynchronously, key presses while the shield is opening will be dropped in the void. https://bugzilla.gnome.org/show_bug.cgi?id=686740
This commit is contained in:
@ -892,14 +892,12 @@ const ScreenShield = new Lang.Class({
|
||||
|
||||
|
||||
let time = global.get_current_time();
|
||||
this._dialog.connect('loaded', Lang.bind(this, function() {
|
||||
if (!this._dialog.open(time, onPrimary)) {
|
||||
// This is kind of an impossible error: we're already modal
|
||||
// by the time we reach this...
|
||||
log('Could not open login dialog: failed to acquire grab');
|
||||
this.deactivate(true);
|
||||
}
|
||||
}));
|
||||
if (!this._dialog.open(time, onPrimary)) {
|
||||
// This is kind of an impossible error: we're already modal
|
||||
// by the time we reach this...
|
||||
log('Could not open login dialog: failed to acquire grab');
|
||||
this.deactivate(true);
|
||||
}
|
||||
|
||||
this._dialog.connect('failed', Lang.bind(this, this._onUnlockFailed));
|
||||
this._dialog.connect('unlocked', Lang.bind(this, this._onUnlockSucceded));
|
||||
|
Reference in New Issue
Block a user