From f39e5270039d01da66664182e5028c7bfc4ee945 Mon Sep 17 00:00:00 2001
From: vanfanel <[EMAIL REDACTED]>
Date: Sun, 28 Dec 2025 10:55:42 +0100
Subject: [PATCH] Add SDL2COMPAT_DISABLE_X11 guards
---
include/SDL2/SDL_syswm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/SDL2/SDL_syswm.h b/include/SDL2/SDL_syswm.h
index 18f68732..409338fd 100644
--- a/include/SDL2/SDL_syswm.h
+++ b/include/SDL2/SDL_syswm.h
@@ -59,7 +59,7 @@ struct SDL_SysWMinfo;
#endif
/* This is the structure for custom window manager events */
-#if defined(SDL_VIDEO_DRIVER_X11)
+#if defined(SDL_VIDEO_DRIVER_X11) && !defined(SDL2COMPAT_DISABLE_X11)
#if defined(__APPLE__) && defined(__MACH__)
/* conflicts with Quickdraw.h */
#define Cursor X11Cursor
@@ -168,7 +168,7 @@ struct SDL_SysWMmsg
LPARAM lParam; /**< LONG message parameter */
} win;
#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
+#if defined(SDL_VIDEO_DRIVER_X11) && !defined(SDL2COMPAT_DISABLE_X11)
struct {
XEvent event;
} x11;
@@ -243,7 +243,7 @@ struct SDL_SysWMinfo
IInspectable * window; /**< The WinRT CoreWindow */
} winrt;
#endif
-#if defined(SDL_VIDEO_DRIVER_X11)
+#if defined(SDL_VIDEO_DRIVER_X11) && !defined(SDL2COMPAT_DISABLE_X11)
struct
{
Display *display; /**< The X11 display */