From 50b0a135a5fce986039bc384d91d55bb76dc66d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 13 Mar 2026 14:09:04 +0100 Subject: [PATCH] Wayland: Fix deadlock causing timeout If the frame was processed by wl_display_dispatch_queue_pending, this would be treated as no frame having been received. Oops. This bug was introduced by fdd14e65b1c29e4e6df875fb5669ec00d6793531. --- src/wl_window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wl_window.c b/src/wl_window.c index 22d2f6ee..931d5672 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -2324,8 +2324,11 @@ GLFWbool _glfwWaitForEGLFrameWayland(_GLFWwindow* window) while (window->wl.egl.callback) { - while (wl_display_prepare_read_queue(_glfw.wl.display, window->wl.egl.queue) != 0) + if (wl_display_prepare_read_queue(_glfw.wl.display, window->wl.egl.queue) != 0) + { wl_display_dispatch_queue_pending(_glfw.wl.display, window->wl.egl.queue); + continue; + } if (!flushDisplay()) {