From 5b02b2217cabb91277a5078956febc291608a0ee Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 13 Sep 2026 10:40:44 -0700 Subject: [PATCH] Added SDL_PROP_WINDOW_CREATE_WIN32_STYLE_EX_NUMBER --- include/SDL3/SDL_video.h | 2 ++ src/video/windows/SDL_windowswindow.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h index 5048f5a056..b85d0275d7 100644 --- a/include/SDL3/SDL_video.h +++ b/include/SDL3/SDL_video.h @@ -1399,6 +1399,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *paren * window, if you want to wrap an existing window. * - `SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER`: optional, * another window to share pixel format with, useful for OpenGL windows + * - `SDL_PROP_WINDOW_CREATE_WIN32_STYLE_EX_NUMBER`: the window style (WS_EX_*) flags to use instead of the defaults. * * These are additional supported properties with X11: * @@ -1494,6 +1495,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowWithProperties(SDL_Prop #define SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER "SDL.window.create.wayland.wl_surface" #define SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER "SDL.window.create.win32.hwnd" #define SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER "SDL.window.create.win32.pixel_format_hwnd" +#define SDL_PROP_WINDOW_CREATE_WIN32_STYLE_EX_NUMBER "SDL.window.create.win32.style_ex" #define SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER "SDL.window.create.x11.window" #define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING "SDL.window.create.emscripten.canvas_id" #define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING "SDL.window.create.emscripten.keyboard_element" diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 7c4270e1aa..7d064ece50 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -713,7 +713,7 @@ bool WIN_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properties } style |= GetWindowStyle(window); - styleEx |= GetWindowStyleEx(window); + styleEx |= (DWORD)SDL_GetNumberProperty(create_props, SDL_PROP_WINDOW_CREATE_WIN32_STYLE_EX_NUMBER, GetWindowStyleEx(window)); // Figure out what the window area will be WIN_ConstrainPopup(window, false);