From d6b9e33e2868cc9c82d8fbb6d4f9545725f78971 Mon Sep 17 00:00:00 2001 From: Moritz Augsburger Date: Sat, 3 Nov 2012 10:32:07 +0000 Subject: [PATCH] Allow passwordless PAM conversations (e.g. fingerprint) --- i3lock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/i3lock.c b/i3lock.c index 5d1da01..22dc3da 100644 --- a/i3lock.c +++ b/i3lock.c @@ -173,9 +173,6 @@ static void clear_pam_wrong(EV_P_ ev_timer *w, int revents) { } static void input_done(void) { - if (input_position == 0) - return; - if (clear_pam_wrong_timeout) { ev_timer_stop(main_loop, clear_pam_wrong_timeout); free(clear_pam_wrong_timeout); @@ -255,6 +252,8 @@ static void handle_key_press(xcb_key_press_event_t *event) { case XKB_KEY_KP_Enter: case XKB_KEY_XF86ScreenSaver: password[input_position] = '\0'; + unlock_state = STATE_KEY_PRESSED; + redraw_screen(); input_done(); case XKB_KEY_Escape: input_position = 0;