i3 - improved tiling WM


Bug fix: Call clear_input() when password is wrong and not in every fork.

Patch status: needinfo

Patch by oblique

Long description:

a305e62 called clear_input() after it forks, as a result the "wrong!"
message didn't show up when the password was wrong.

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

b/i3lock.c

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