diff --git a/src/wl_window.c b/src/wl_window.c index 51747702..56f74c4d 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -866,6 +866,8 @@ static void handleEvents(int timeout) // from the Wayland session; try to handle that the best we can. if (!flushDisplay()) { + wl_display_cancel_read(_glfw.wl.display); + _GLFWwindow* window = _glfw.windowListHead; while (window) { @@ -873,7 +875,6 @@ static void handleEvents(int timeout) window = window->next; } - wl_display_cancel_read(_glfw.wl.display); return; }