Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!) Also moved Wayland structures to the bottom of the union for OCD related issues.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index c43a78d..c83330b 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -101,10 +101,10 @@ typedef enum
SDL_SYSWM_UNKNOWN,
SDL_SYSWM_WINDOWS,
SDL_SYSWM_X11,
- SDL_SYSWM_WAYLAND,
SDL_SYSWM_DIRECTFB,
SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT,
+ SDL_SYSWM_WAYLAND,
} SDL_SYSWM_TYPE;
/**
@@ -176,14 +176,6 @@ struct SDL_SysWMinfo
Window window; /**< The X11 window */
} x11;
#endif
-#if defined(SDL_VIDEO_DRIVER_WAYLAND)
- struct
- {
- struct wl_display *display; /**< Wayland display */
- struct wl_surface *surface; /**< Wayland surface */
- struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
- } wl;
-#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct
{
@@ -204,6 +196,14 @@ struct SDL_SysWMinfo
UIWindow *window; /* The UIKit window */
} uikit;
#endif
+#if defined(SDL_VIDEO_DRIVER_WAYLAND)
+ struct
+ {
+ struct wl_display *display; /**< Wayland display */
+ struct wl_surface *surface; /**< Wayland surface */
+ struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
+ } wl;
+#endif
/* Can't have an empty union */
int dummy;
} info;