i3 - improved tiling WM


Bug fix: Call clear_input() when the password is wrong.

Patch status: merged

Patch by oblique

Long description:

clear_input() calls start_clear_indicator_timeout() to clear the
indicator after 1 second. This had as a result the screen to be cleared
when the "verifying…" message was showed, so the "wrong!" message didn't
show up when the password was wrong.

First bad commit: a305e62

To apply this patch, use:
curl http://cr.i3wm.org/patch/276/raw.patch | git am

b/i3lock.c

22
@@ -205,6 +205,7 @@ static void auth_failed(void) {
23
         fprintf(stderr, "Authentication failure\n");
24
 
25
     pam_state = STATE_PAM_WRONG;
26
+    clear_input();
27
     redraw_screen();
28
 
29
     /* Clear this state after 2 seconds (unless the user enters another
30
@@ -258,7 +259,6 @@ static void input_done(void) {
31
     if (cpid == 0) {
32
         exit(pam_authenticate(pam_handle, 0) == PAM_SUCCESS);
33
     } else if (cpid > 0) {
34
-        clear_input();
35
         struct ev_child *child_watcher = calloc(sizeof(struct ev_io), 1);
36
         ev_child_init(child_watcher, child_cb, cpid, 0);
37
         ev_child_set(child_watcher, cpid, 0);