From e225a10ea8e1f273dd12093a548a4ef3b58b3810 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Sat, 5 Apr 2025 15:32:30 -0400 Subject: [PATCH] x11: Only enable _NET_WM_SYNC_REQUEST for OpenGL windows It doesn't work well with Vulkan, and Vulkan windows may not have the Vulkan flag set in all circumstances, so only enable it if we explicitly know that OpenGL is being requested instead. (cherry picked from commit 646f1f243f8be853531703c1f656325580435f9e) --- src/video/x11/SDL_x11window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 0e20dcda95..df30db9840 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -534,7 +534,7 @@ bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properties } const bool force_override_redirect = SDL_GetHintBoolean(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, false); - const bool use_resize_sync = !(window->flags & SDL_WINDOW_VULKAN); /* doesn't work well with Vulkan */ + const bool use_resize_sync = !!(window->flags & SDL_WINDOW_OPENGL); // Doesn't work well with Vulkan SDL_WindowData *windowdata; Display *display = data->display; int screen = displaydata->screen;