Ensure that ext_session_lock_v1.unlock_and_destroy is processed.

Use wl_display_roundtrip to ensure that the unlock request is received
and processed by the server. The protocol requires[1] this to avoid
possible races.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/161
This commit is contained in:
Aleksei Bavshin 2022-11-11 22:47:53 -08:00 committed by Simon Ser
parent cc2779330f
commit 1225e75be0

2
main.c
View File

@ -1285,7 +1285,7 @@ int main(int argc, char **argv) {
if (state.ext_session_lock_v1) { if (state.ext_session_lock_v1) {
ext_session_lock_v1_unlock_and_destroy(state.ext_session_lock_v1); ext_session_lock_v1_unlock_and_destroy(state.ext_session_lock_v1);
wl_display_flush(state.display); wl_display_roundtrip(state.display);
} }
free(state.args.font); free(state.args.font);