summaryrefslogtreecommitdiff
path: root/src/wlstate.cc
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-10 18:38:17 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-10 18:38:17 +0100
commit48afe77b982f496b9da73f2dc713ee880e7eb110 (patch)
tree4ce3a12c6113542efa8f49c24ebd50f248ee9a0a /src/wlstate.cc
parent0d5a1e251d98ea438a9a079d8c16c1afe71dc0f9 (diff)
fix stale state
Diffstat (limited to 'src/wlstate.cc')
-rw-r--r--src/wlstate.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wlstate.cc b/src/wlstate.cc
index 5233868..940a011 100644
--- a/src/wlstate.cc
+++ b/src/wlstate.cc
@@ -114,7 +114,10 @@ void wayc_wlstate_update(struct wlstate_s* state) {
i32 rc = poll(&pfd, 1, 0);
if (rc == -1) wayc_panic("Failed to poll Wayland eventfd");
- if (!(pfd.revents & POLLIN)) return;
+ if (!(pfd.revents & POLLIN)) {
+ wl_display_dispatch_pending(state->display);
+ return;
+ }
rc = wl_display_dispatch(state->display);
if (rc == -1) wayc_panic("Failed to dispatch Wayland events");