screenShield: Rework key focus management
Instead of always grabbing key focus for the screen lock group, do that for the unlock dialog itself. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
This commit is contained in:
parent
3387c8787c
commit
24d36e13ec
@ -55,11 +55,14 @@ var ScreenShield = class {
|
|||||||
});
|
});
|
||||||
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
||||||
|
|
||||||
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
this._lockDialogGroup = new St.Widget({
|
||||||
y_expand: true,
|
x_expand: true,
|
||||||
reactive: true,
|
y_expand: true,
|
||||||
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
|
reactive: true,
|
||||||
name: 'lockDialogGroup' });
|
can_focus: true,
|
||||||
|
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
|
||||||
|
name: 'lockDialogGroup',
|
||||||
|
});
|
||||||
|
|
||||||
this.actor.add_actor(this._lockScreenGroup);
|
this.actor.add_actor(this._lockScreenGroup);
|
||||||
this.actor.add_actor(this._lockDialogGroup);
|
this.actor.add_actor(this._lockDialogGroup);
|
||||||
@ -148,7 +151,7 @@ var ScreenShield = class {
|
|||||||
// LoginDialog.cancel() will grab the key focus
|
// LoginDialog.cancel() will grab the key focus
|
||||||
// on its own, so ensure it stays on lock screen
|
// on its own, so ensure it stays on lock screen
|
||||||
// instead
|
// instead
|
||||||
this._lockScreenGroup.grab_key_focus();
|
this._dialog.grab_key_focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +410,7 @@ var ScreenShield = class {
|
|||||||
this._lockScreenShown({ fadeToBlack, animateFade: false });
|
this._lockScreenShown({ fadeToBlack, animateFade: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lockScreenGroup.grab_key_focus();
|
this._dialog.grab_key_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
_lockScreenShown(params) {
|
_lockScreenShown(params) {
|
||||||
|
@ -397,6 +397,7 @@ var UnlockDialog = GObject.registerClass({
|
|||||||
accessible_role: Atk.Role.WINDOW,
|
accessible_role: Atk.Role.WINDOW,
|
||||||
style_class: 'login-dialog',
|
style_class: 'login-dialog',
|
||||||
visible: false,
|
visible: false,
|
||||||
|
can_focus: true,
|
||||||
reactive: true,
|
reactive: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user