|
|
553d37 |
From ce8ac36613ef4fbb697fc9f6613844168c05a8d3 Mon Sep 17 00:00:00 2001
|
|
|
553d37 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
553d37 |
Date: Fri, 8 Oct 2021 11:08:17 -0400
|
|
|
553d37 |
Subject: [PATCH 1/2] unlockDialog: Don't create AuthDialog just to finish it
|
|
|
553d37 |
|
|
|
553d37 |
If the the unlock dialog gets finished before an auth dialog is
|
|
|
553d37 |
created, the code currently creates one just to tell it to finish.
|
|
|
553d37 |
|
|
|
553d37 |
This commit changes the code to skip creating the auth dialog in
|
|
|
553d37 |
that case.
|
|
|
553d37 |
|
|
|
553d37 |
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1999>
|
|
|
553d37 |
---
|
|
|
553d37 |
js/ui/unlockDialog.js | 6 +++++-
|
|
|
553d37 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
553d37 |
|
|
|
553d37 |
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
|
|
553d37 |
index c81c6184a9..d8c45f7510 100644
|
|
|
553d37 |
--- a/js/ui/unlockDialog.js
|
|
|
553d37 |
+++ b/js/ui/unlockDialog.js
|
|
|
553d37 |
@@ -884,7 +884,11 @@ var UnlockDialog = GObject.registerClass({
|
|
|
553d37 |
}
|
|
|
553d37 |
|
|
|
553d37 |
finish(onComplete) {
|
|
|
553d37 |
- this._ensureAuthPrompt();
|
|
|
553d37 |
+ if (!this._authPrompt) {
|
|
|
553d37 |
+ onComplete();
|
|
|
553d37 |
+ return;
|
|
|
553d37 |
+ }
|
|
|
553d37 |
+
|
|
|
553d37 |
this._authPrompt.finish(onComplete);
|
|
|
553d37 |
}
|
|
|
553d37 |
|
|
|
553d37 |
--
|
|
|
553d37 |
2.39.1
|
|
|
553d37 |
|
|
|
553d37 |
|
|
|
553d37 |
From 2a513d44e7b887b355d6b71cf88c4114a8b685f8 Mon Sep 17 00:00:00 2001
|
|
|
553d37 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
553d37 |
Date: Tue, 5 Oct 2021 11:01:19 -0400
|
|
|
553d37 |
Subject: [PATCH 2/2] unlockDialog: Properly reset auth prompt when showing it
|
|
|
553d37 |
|
|
|
553d37 |
If a user hits escape twice really fast when coming back to
|
|
|
553d37 |
their machine to unlock it, they made end up getting presented
|
|
|
553d37 |
with a non-functional unlock screen that doesn't show their
|
|
|
553d37 |
user icon and doesn't ask for a password.
|
|
|
553d37 |
|
|
|
553d37 |
This is because showPrompt assumes that if an auth prompt already
|
|
|
553d37 |
exists, it's ready to go. That may not be true, if it's in the
|
|
|
553d37 |
process of getting torn down at the time because it's in the middle
|
|
|
553d37 |
of a cancel animation.
|
|
|
553d37 |
|
|
|
553d37 |
This commit solves the problem by ensuring the auth prompt is always
|
|
|
553d37 |
in a fresh reset state before showing it.
|
|
|
553d37 |
|
|
|
553d37 |
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1999>
|
|
|
553d37 |
---
|
|
|
553d37 |
js/ui/unlockDialog.js | 18 ++++++++----------
|
|
|
553d37 |
1 file changed, 8 insertions(+), 10 deletions(-)
|
|
|
553d37 |
|
|
|
553d37 |
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
|
|
553d37 |
index d8c45f7510..00e3eef971 100644
|
|
|
553d37 |
--- a/js/ui/unlockDialog.js
|
|
|
553d37 |
+++ b/js/ui/unlockDialog.js
|
|
|
553d37 |
@@ -689,16 +689,14 @@ var UnlockDialog = GObject.registerClass({
|
|
|
553d37 |
}
|
|
|
553d37 |
|
|
|
553d37 |
_ensureAuthPrompt() {
|
|
|
553d37 |
- if (this._authPrompt)
|
|
|
553d37 |
- return;
|
|
|
553d37 |
-
|
|
|
553d37 |
- this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient,
|
|
|
553d37 |
- AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
|
|
553d37 |
- this._authPrompt.connect('failed', this._fail.bind(this));
|
|
|
553d37 |
- this._authPrompt.connect('cancelled', this._fail.bind(this));
|
|
|
553d37 |
- this._authPrompt.connect('reset', this._onReset.bind(this));
|
|
|
553d37 |
-
|
|
|
553d37 |
- this._promptBox.add_child(this._authPrompt);
|
|
|
553d37 |
+ if (!this._authPrompt) {
|
|
|
553d37 |
+ this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient,
|
|
|
553d37 |
+ AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
|
|
553d37 |
+ this._authPrompt.connect('failed', this._fail.bind(this));
|
|
|
553d37 |
+ this._authPrompt.connect('cancelled', this._fail.bind(this));
|
|
|
553d37 |
+ this._authPrompt.connect('reset', this._onReset.bind(this));
|
|
|
553d37 |
+ this._promptBox.add_child(this._authPrompt);
|
|
|
553d37 |
+ }
|
|
|
553d37 |
|
|
|
553d37 |
this._authPrompt.reset();
|
|
|
553d37 |
this._authPrompt.updateSensitivity(true);
|
|
|
553d37 |
--
|
|
|
553d37 |
2.39.1
|
|
|
553d37 |
|