diff options
| author | Martin Trojer <martin.trojer@gmail.com> | 2026-10-29 06:58:01 +0000 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2026-10-29 08:11:12 +0100 |
| commit | 6ad9ebf3e14deac54a298c10df3e8701061fe495 (patch) | |
| tree | 1d39dfef4d0f3c2407778572a465ec6a6c8757ba /seat.c | |
| parent | 711bbd9de97ff3df672690042000df9f753ab8bd (diff) | |
seat: don't repeat password submission
Thread a bool repeat flag from the key-repeat timer into
swaylock_handle_key (real presses pass false) and skip
submit_password on repeats, so holding Return/KP_Enter or
Ctrl-D/J/M no longer sends repeated attempts to PAM. Repeats
of other keys are unchanged, and the submit keys stay defined
in one place (password.c).
Diffstat (limited to 'seat.c')
| -rw-r--r-- | seat.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -72,7 +72,7 @@ static void keyboard_repeat(void *data) { struct swaylock_state *state = seat->state; seat->repeat_timer = loop_add_timer( state->eventloop, seat->repeat_period_ms, keyboard_repeat, seat); - swaylock_handle_key(state, seat->repeat_sym, seat->repeat_codepoint); + swaylock_handle_key(state, seat->repeat_sym, seat->repeat_codepoint, true); } static void keyboard_key(void *data, struct wl_keyboard *wl_keyboard, @@ -89,7 +89,7 @@ static void keyboard_key(void *data, struct wl_keyboard *wl_keyboard, key + 8 : 0; uint32_t codepoint = xkb_state_key_get_utf32(state->xkb.state, keycode); if (key_state == WL_KEYBOARD_KEY_STATE_PRESSED) { - swaylock_handle_key(state, sym, codepoint); + swaylock_handle_key(state, sym, codepoint, false); } stop_repeat(seat); |
