screenShield: Activate dialog when necessary
Activating a dialog is slightly different from opening it; the former is about showing the user authentication widgetry, while the latter is about creating it and pre-allocating the necessary resources. Activate the screen shield dialog when necessary. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
This commit is contained in:
parent
e42700a308
commit
7851069d9c
@ -1228,13 +1228,18 @@ var LoginDialog = GObject.registerClass({
|
|||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
activate() {
|
||||||
|
this._userList.grab_key_focus();
|
||||||
|
this.show();
|
||||||
|
}
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
Main.ctrlAltTabManager.addGroup(this,
|
Main.ctrlAltTabManager.addGroup(this,
|
||||||
_("Login Window"),
|
_("Login Window"),
|
||||||
'dialog-password-symbolic',
|
'dialog-password-symbolic',
|
||||||
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
|
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
|
||||||
this._userList.grab_key_focus();
|
this.activate();
|
||||||
this.show();
|
|
||||||
this.opacity = 0;
|
this.opacity = 0;
|
||||||
|
|
||||||
Main.pushModal(this, { actionMode: Shell.ActionMode.LOGIN_SCREEN });
|
Main.pushModal(this, { actionMode: Shell.ActionMode.LOGIN_SCREEN });
|
||||||
|
@ -159,8 +159,8 @@ var ScreenShield = class {
|
|||||||
|
|
||||||
_liftShield() {
|
_liftShield() {
|
||||||
if (this._isLocked) {
|
if (this._isLocked) {
|
||||||
if (this._ensureUnlockDialog(true /* allowCancel */))
|
this._ensureUnlockDialog(true /* allowCancel */);
|
||||||
this._hideLockScreen(true /* animate */);
|
this._dialog.activate();
|
||||||
} else {
|
} else {
|
||||||
this.deactivate(true /* animate */);
|
this.deactivate(true /* animate */);
|
||||||
}
|
}
|
||||||
@ -437,6 +437,7 @@ var ScreenShield = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._dialog.allowCancel = allowCancel;
|
this._dialog.allowCancel = allowCancel;
|
||||||
|
this._dialog.grab_key_focus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,6 +527,10 @@ var UnlockDialog = GObject.registerClass({
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
activate() {
|
||||||
|
this._showPrompt();
|
||||||
|
}
|
||||||
|
|
||||||
popModal(timestamp) {
|
popModal(timestamp) {
|
||||||
if (this._isModal) {
|
if (this._isModal) {
|
||||||
Main.popModal(this, timestamp);
|
Main.popModal(this, timestamp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user