From 1a6e139dde5bf9a226f4b37ba820b64174321cf5 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 26 Dec 2024 18:17:14 -0500
Subject: [PATCH] win32: Only recalculate the position on show for popup
windows
Regular child windows aren't positioned relative to the parent.
---
src/video/windows/SDL_windowswindow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 4d4884cd54ac5..b07d7dc0fb63f 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -1064,7 +1064,7 @@ void WIN_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window)
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
WIN_SetWindowPosition(_this, window);
}