diff options
Diffstat (limited to 'swaylock/password.c')
-rw-r--r-- | swaylock/password.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/swaylock/password.c b/swaylock/password.c index fecaecbf..6138e1fe 100644 --- a/swaylock/password.c +++ b/swaylock/password.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #define _XOPEN_SOURCE 500 | 1 | #define _XOPEN_SOURCE 500 |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | #include <errno.h> | ||
3 | #include <pwd.h> | 4 | #include <pwd.h> |
4 | #include <stdlib.h> | 5 | #include <stdlib.h> |
5 | #include <string.h> | 6 | #include <string.h> |
@@ -97,7 +98,10 @@ void swaylock_handle_key(struct swaylock_state *state, | |||
97 | state->eventloop, 50, handle_preverify_timeout, state); | 98 | state->eventloop, 50, handle_preverify_timeout, state); |
98 | 99 | ||
99 | while (state->run_display && state->verify_password_timer) { | 100 | while (state->run_display && state->verify_password_timer) { |
100 | wl_display_flush(state->display); | 101 | errno = 0; |
102 | if (wl_display_flush(state->display) == -1 && errno != EAGAIN) { | ||
103 | break; | ||
104 | } | ||
101 | loop_poll(state->eventloop); | 105 | loop_poll(state->eventloop); |
102 | 106 | ||
103 | bool ok = 1; | 107 | bool ok = 1; |