mirror of https://github.com/i3/i3lock.git
Bug fix: Call clear_input() when the password is wrong.
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
pull/1/head
parent
a305e622a6
commit
33d953fbdf
2
i3lock.c
2
i3lock.c
|
@ -205,6 +205,7 @@ static void auth_failed(void) {
|
||||||
fprintf(stderr, "Authentication failure\n");
|
fprintf(stderr, "Authentication failure\n");
|
||||||
|
|
||||||
pam_state = STATE_PAM_WRONG;
|
pam_state = STATE_PAM_WRONG;
|
||||||
|
clear_input();
|
||||||
redraw_screen();
|
redraw_screen();
|
||||||
|
|
||||||
/* Clear this state after 2 seconds (unless the user enters another
|
/* Clear this state after 2 seconds (unless the user enters another
|
||||||
|
@ -258,7 +259,6 @@ static void input_done(void) {
|
||||||
if (cpid == 0) {
|
if (cpid == 0) {
|
||||||
exit(pam_authenticate(pam_handle, 0) == PAM_SUCCESS);
|
exit(pam_authenticate(pam_handle, 0) == PAM_SUCCESS);
|
||||||
} else if (cpid > 0) {
|
} else if (cpid > 0) {
|
||||||
clear_input();
|
|
||||||
struct ev_child *child_watcher = calloc(sizeof(struct ev_io), 1);
|
struct ev_child *child_watcher = calloc(sizeof(struct ev_io), 1);
|
||||||
ev_child_init(child_watcher, child_cb, cpid, 0);
|
ev_child_init(child_watcher, child_cb, cpid, 0);
|
||||||
ev_child_set(child_watcher, cpid, 0);
|
ev_child_set(child_watcher, cpid, 0);
|
||||||
|
|
Loading…
Reference in New Issue