diff options
Diffstat (limited to 'swaylock')
-rw-r--r-- | swaylock/password.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/swaylock/password.c b/swaylock/password.c index bb32286e..d844ec98 100644 --- a/swaylock/password.c +++ b/swaylock/password.c | |||
@@ -97,7 +97,20 @@ void swaylock_handle_key(struct swaylock_state *state, | |||
97 | case XKB_KEY_Return: | 97 | case XKB_KEY_Return: |
98 | state->auth_state = AUTH_STATE_VALIDATING; | 98 | state->auth_state = AUTH_STATE_VALIDATING; |
99 | damage_state(state); | 99 | damage_state(state); |
100 | wl_display_roundtrip(state->display); | 100 | while (wl_display_dispatch(state->display) != -1 && state->run_display) { |
101 | bool ok = 1; | ||
102 | struct swaylock_surface *surface; | ||
103 | wl_list_for_each(surface, &state->surfaces, link) { | ||
104 | if (surface->dirty) { | ||
105 | ok = 0; | ||
106 | } | ||
107 | } | ||
108 | if (ok) { | ||
109 | break; | ||
110 | } | ||
111 | } | ||
112 | wl_display_flush(state->display); | ||
113 | |||
101 | if (attempt_password(&state->password)) { | 114 | if (attempt_password(&state->password)) { |
102 | state->run_display = false; | 115 | state->run_display = false; |
103 | break; | 116 | break; |