Fix unlock prompt when animations are disabled

Resolves: RHEL-36252
This commit is contained in:
Florian Müllner 2024-05-15 02:40:07 +02:00
parent 8ebbe4db8f
commit 4ddaddd639
No known key found for this signature in database
2 changed files with 81 additions and 0 deletions

80
fix-stuck-prompt.patch Normal file
View File

@ -0,0 +1,80 @@
From 2dc565e817c44a42407a9e7d7f4e5007a2ca13f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 14 May 2024 19:49:56 +0200
Subject: [PATCH 1/2] authPrompt: Use signal handler instead of vfunc
The prompt itself may get destroyed when canceled, in which
case it is no longer possible to chain up in the vfunc.
This is usually not an issue as the prompt is only destroyed
at the end of a transition, but it results in a warning if
animations are disabled.
---
js/gdm/authPrompt.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 3bfcd0d3db..f6106e761e 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -141,10 +141,10 @@ export const AuthPrompt = GObject.registerClass({
this._userVerifier = null;
}
- vfunc_key_press_event(event) {
+ on_key_press_event(event) {
if (event.get_key_symbol() === Clutter.KEY_Escape)
this.cancel();
- return super.vfunc_key_press_event(event);
+ return Clutter.EVENT_PROPAGATE;
}
_initInputRow() {
--
2.45.0
From 1ca1330d92049b7bb8f71ddef1363ba9536098c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 15 May 2024 01:55:40 +0200
Subject: [PATCH 2/2] authPrompt: Consume cancel key event
The auth prompt currently propagates all key presses, even the
Escape press that is used to cancel it.
On the lock screen that means that the same event that cancels
the prompt (and switches back to the clock) is *also* propagated
to the handler that activates the prompt on key press.
That handler doesn't do anything when the prompt is already visible,
which is the case when the transition to the clock is animated.
However when animations are disabled, canceling the prompt will
result in a new prompt getting created immediately, and the login
screen is stuck on the prompt.
Fix this by not propagating key events that are used to cancel
the prompt.
---
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 f6106e761e..254b4dbb88 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -142,8 +142,10 @@ export const AuthPrompt = GObject.registerClass({
}
on_key_press_event(event) {
- if (event.get_key_symbol() === Clutter.KEY_Escape)
+ if (event.get_key_symbol() === Clutter.KEY_Escape) {
this.cancel();
+ return Clutter.EVENT_STOP;
+ }
return Clutter.EVENT_PROPAGATE;
}
--
2.45.0

View File

@ -31,6 +31,7 @@ Patch: 0001-screenShield-unblank-when-inserting-smartcard.patch
Patch: enforce-smartcard-at-unlock.patch Patch: enforce-smartcard-at-unlock.patch
Patch: disable-unlock-entry-until-question.patch Patch: disable-unlock-entry-until-question.patch
Patch: 0001-loginDialog-make-info-messages-themed.patch Patch: 0001-loginDialog-make-info-messages-themed.patch
Patch: fix-stuck-prompt.patch
# Extensions # Extensions
Patch: 0001-extensionDownloader-Refuse-to-override-system-extens.patch Patch: 0001-extensionDownloader-Refuse-to-override-system-extens.patch