Apparently on Wayland we need to set the swap interval on every window not just the first. It's somehow not shared even though the context is shared? Fixes #5495

This commit is contained in:
Kovid Goyal 2022-09-10 10:41:31 +05:30
parent 0fac6e4de9
commit 67d70f8b8f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -856,7 +856,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) {
// changing, in case the background color is not black
blank_canvas(is_semi_transparent ? OPT(background_opacity) : 1.0f, OPT(background));
#ifndef __APPLE__
if (is_first_window) glfwSwapInterval(OPT(sync_to_monitor) && !global_state.is_wayland ? 1 : 0);
glfwSwapInterval(OPT(sync_to_monitor) && !global_state.is_wayland ? 1 : 0);
#endif
// On Wayland the initial swap is allowed only after the first XDG configure event
if (glfwAreSwapsAllowed(glfw_window)) glfwSwapBuffers(glfw_window);