diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-10-24 18:54:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-24 18:54:22 +0200 |
| commit | 28e5138fad79774d8d432012b9b5afa2fefe6dba (patch) | |
| tree | 82e13ab801da2a4858b59d8e42b0760af60055c7 /password.c | |
| parent | d7ffed8b49689a3be55d390346e7d12e94e47677 (diff) | |
| parent | 274179a804e67e0f191312350c52c10778c6e5c7 (diff) | |
Merge pull request #2925 from ianyfan/swaylock
swaylock: exit early if unable to get input inhibitor
Diffstat (limited to 'password.c')
| -rw-r--r-- | password.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,6 @@ #define _XOPEN_SOURCE 500 #include <assert.h> +#include <errno.h> #include <pwd.h> #include <stdlib.h> #include <string.h> @@ -97,7 +98,10 @@ void swaylock_handle_key(struct swaylock_state *state, state->eventloop, 50, handle_preverify_timeout, state); while (state->run_display && state->verify_password_timer) { - wl_display_flush(state->display); + errno = 0; + if (wl_display_flush(state->display) == -1 && errno != EAGAIN) { + break; + } loop_poll(state->eventloop); bool ok = 1; |
