win32: Only recalculate the position on show for popup windows

Regular child windows aren't positioned relative to the parent.
This commit is contained in:
Frank Praznik
2024-12-26 18:17:14 -05:00
parent cf220ea4f1
commit 1a6e139dde

View File

@@ -1064,7 +1064,7 @@ void WIN_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window)
bool bActivate = SDL_GetHintBoolean(SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN, true); bool bActivate = SDL_GetHintBoolean(SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN, true);
if (window->parent) { if (SDL_WINDOW_IS_POPUP(window)) {
// Update our position in case our parent moved while we were hidden // Update our position in case our parent moved while we were hidden
WIN_SetWindowPosition(_this, window); WIN_SetWindowPosition(_this, window);
} }