mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3317>
(cherry picked from commit e7dc0de75e)
This commit is contained in:
parent
bdf981b171
commit
6f4529e44d
1 changed files with 3 additions and 1 deletions
|
|
@ -134,8 +134,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue