Implement a grace timer for swaylock

This commit is contained in:
Jarkko Oranen 2018-11-05 18:51:18 +02:00
parent d0bb450681
commit a3e54b6ef0
4 changed files with 28 additions and 1 deletions

View file

@ -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: