mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Implement a grace timer for swaylock
This commit is contained in:
parent
d0bb450681
commit
a3e54b6ef0
4 changed files with 28 additions and 1 deletions
|
|
@ -80,6 +80,10 @@ static void handle_preverify_timeout(void *data) {
|
|||
|
||||
void swaylock_handle_key(struct swaylock_state *state,
|
||||
xkb_keysym_t keysym, uint32_t codepoint) {
|
||||
if (state->within_grace) {
|
||||
state->run_display = false;
|
||||
return;
|
||||
}
|
||||
switch (keysym) {
|
||||
case XKB_KEY_KP_Enter: /* fallthrough */
|
||||
case XKB_KEY_Return:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue