[gnome-shell] authPrompt: Don't focus hidden cancelButton
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] authPrompt: Don't focus hidden cancelButton
- Date: Mon, 24 Feb 2020 12:37:23 +0000 (UTC)
commit ab24ee7a7e0177b8780f40252784a75ff7db977f
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Feb 19 17:32:22 2020 +0100
authPrompt: Don't focus hidden cancelButton
The button is hidden on the lock screen, so it shouldn't be allowed to
activate it, be it via click or keyboard. The latter is still possible
by keynaving to the button and hitting space/enter. Fix that by making
the button unfocusable when we make it unreactive.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
js/gdm/authPrompt.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 0cb2462a0c..bab6d5deee 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -134,7 +134,7 @@ var AuthPrompt = GObject.registerClass({
style_class: 'modal-dialog-button button cancel-button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: this._hasCancelButton,
- can_focus: true,
+ can_focus: this._hasCancelButton,
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER,
child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
@@ -285,6 +285,7 @@ var AuthPrompt = GObject.registerClass({
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
this.cancelButton.reactive = false;
+ this.cancelButton.can_focus = false;
}
_onReset() {
@@ -453,6 +454,7 @@ var AuthPrompt = GObject.registerClass({
let oldStatus = this.verificationStatus;
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
this.cancelButton.reactive = this._hasCancelButton;
+ this.cancelButton.can_focus = this._hasCancelButton;
this._preemptiveAnswer = null;
if (this._userVerifier)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]