mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
Don't apply creation window flags to external windows.
Whoever provided the window has already set it up the way they want it. Fixes SDL removing iconified or maximized state when creating a window from an existing OS window.
This commit is contained in:
@@ -2146,10 +2146,15 @@ static void ApplyWindowFlags(SDL_Window *window, SDL_WindowFlags flags)
|
|||||||
static void SDL_FinishWindowCreation(SDL_Window *window, SDL_WindowFlags flags)
|
static void SDL_FinishWindowCreation(SDL_Window *window, SDL_WindowFlags flags)
|
||||||
{
|
{
|
||||||
PrepareDragAndDropSupport(window);
|
PrepareDragAndDropSupport(window);
|
||||||
|
|
||||||
|
if (window->flags & SDL_WINDOW_EXTERNAL) {
|
||||||
|
// Whoever has created the window has already applied whatever flags are needed
|
||||||
|
} else {
|
||||||
ApplyWindowFlags(window, flags);
|
ApplyWindowFlags(window, flags);
|
||||||
if (!(flags & SDL_WINDOW_HIDDEN)) {
|
if (!(flags & SDL_WINDOW_HIDDEN)) {
|
||||||
SDL_ShowWindow(window);
|
SDL_ShowWindow(window);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SDL_ContextNotSupported(const char *name)
|
static int SDL_ContextNotSupported(const char *name)
|
||||||
|
Reference in New Issue
Block a user