mirror of
https://github.com/glfw/glfw.git
synced 2026-04-17 18:33:17 +02:00
When the swap interval was nonzero, EGL on Wayland would wait indefinitely for a frame callback on a suspended window, causing applications that call eglSwapBuffers to halt. This re-implements the wait for a surface frame so that we can add a reasonable timeout, while setting the EGL swap interval to zero. That allows applications to make progress despite the window being suspended. Some insights for how to structure this workaround were gleaned from dri2_wl_swap_buffers_with_damage in Mesa. This initial implementation still has a race between glfwHideWindow and glfwSwapBuffers when rendering on a separate thread. This could lead to a window becoming visible again after being hidden on the main thread. Related to #1350 Fixes #2582 Fixes #2640 Fixes #2719 Fixes #2723 Fixes #2800 Fixes #2827