From 643437f5b0ca64b3d3aca6b56d6fd910ef322e1d Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 2 Oct 2024 13:43:04 -0400
Subject: [PATCH] Reapply "wayland: Don't initialize OpenGL when the window
flags didn't specify it"
This reverts commit 120b8d4189d0979e4838daeb25d5a69e6260f5e0.
The issue this was patching over in Vanilla-Conquer was the lack of an exposure event when showing a window, which has since been remedied.
Attaching EGL window objects can also cause protocol violations now that the explicit sync protocol is in use, if SDL creates one and then the client tries to attach one itself, so they really shouldn't be created unless the client specifically requested it.
---
src/video/wayland/SDL_waylandwindow.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index b8fe0b7420e1e..a09181bf84f22 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1939,13 +1939,6 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
c = _this->driverdata;
window->driverdata = data;
- if (!(window->flags & SDL_WINDOW_VULKAN)) {
- if (!(window->flags & SDL_WINDOW_OPENGL)) {
- SDL_GL_LoadLibrary(NULL);
- window->flags |= SDL_WINDOW_OPENGL;
- }
- }
-
if (window->x == SDL_WINDOWPOS_UNDEFINED) {
window->x = 0;
}