From 1225e75be0a1f328415db1248c3588bf60adf29a Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 11 Nov 2022 22:47:53 -0800 Subject: [PATCH] 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 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b37cd8f..d343c5b 100644 --- a/main.c +++ b/main.c @@ -1285,7 +1285,7 @@ int main(int argc, char **argv) { if (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);