Skip to content

Commit

Permalink
Revert "Preserve behavior of libsdl-org/SDL@120b8d4"
Browse files Browse the repository at this point in the history
The root issue necessitating this workaround was identified and fixed, and creating an EGL window when not needed can now cause protocol errors, as the EGL window object attaches a sync object to the surface, of which only one is allowed, so if some other part of the graphics stack then tries to attach another sync object, the program will be halted.
  • Loading branch information
Kontrabant committed Jan 11, 2025
1 parent 8a72eae commit 0933cfd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/sdl2_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6944,7 +6944,6 @@ WindowPos2To3(int *x, int *y)
SDL_DECLSPEC SDL_Window * SDLCALL
SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
{
const char *driver;
SDL_Window *window = NULL;
const Uint32 is_popup = flags & (SDL_WINDOW_POPUP_MENU | SDL_WINDOW_TOOLTIP);

Expand All @@ -6959,14 +6958,6 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
flags |= SDL_WINDOW_UTILITY;
}

/* Preserve behavior in https://github.com/libsdl-org/SDL/commit/120b8d4189d0979e4838daeb25d5a69e6260f5e0 */
driver = SDL3_GetCurrentVideoDriver();
if (driver && SDL3_strcmp(driver, "wayland") == 0) {
if (!(flags & SDL_WINDOW_VULKAN)) {
flags |= SDL_WINDOW_OPENGL;
}
}

if (!is_popup) {
SDL_PropertiesID props = SDL3_CreateProperties();

Expand Down

0 comments on commit 0933cfd

Please sign in to comment.