]> git.sur5r.net Git - i3/i3lock/commitdiff
Allow passwordless PAM conversations (e.g. fingerprint)
authorMoritz Augsburger <moritz@augsburger.name>
Sat, 3 Nov 2012 10:32:07 +0000 (10:32 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 4 Nov 2012 18:01:52 +0000 (19:01 +0100)
i3lock.c

index 5d1da0162d3d0b290cffc03f50816fdfcffe9f11..22dc3da87c1db0be8f6814a8ba0a3c6920553a96 100644 (file)
--- 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;