swaylock: fix the displaying of "verified"
Displaying verified after damaging state needs more than one roundtrip, so keep looping until surfaces are not dirty anymore
This commit is contained in:
parent
1468d89395
commit
01d2c492fd
15
password.c
15
password.c
@ -97,7 +97,20 @@ void swaylock_handle_key(struct swaylock_state *state,
|
|||||||
case XKB_KEY_Return:
|
case XKB_KEY_Return:
|
||||||
state->auth_state = AUTH_STATE_VALIDATING;
|
state->auth_state = AUTH_STATE_VALIDATING;
|
||||||
damage_state(state);
|
damage_state(state);
|
||||||
wl_display_roundtrip(state->display);
|
while (wl_display_dispatch(state->display) != -1 && state->run_display) {
|
||||||
|
bool ok = 1;
|
||||||
|
struct swaylock_surface *surface;
|
||||||
|
wl_list_for_each(surface, &state->surfaces, link) {
|
||||||
|
if (surface->dirty) {
|
||||||
|
ok = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ok) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wl_display_flush(state->display);
|
||||||
|
|
||||||
if (attempt_password(&state->password)) {
|
if (attempt_password(&state->password)) {
|
||||||
state->run_display = false;
|
state->run_display = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user