summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksei Bavshin <alebastr89@gmail.com>2022-11-11 22:47:53 -0800
committerSimon Ser <contact@emersion.fr>2022-11-12 10:40:19 +0100
commit1225e75be0a1f328415db1248c3588bf60adf29a (patch)
tree75179c1114deae13d29a16d4f9c4cff29ed12ffc
parentcc2779330f3357cc5810b0079fd4460d65779a6d (diff)
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
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
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);