SDL: win32: Set the resize flag to match the SetWindowPos() flags

From 341496be7baf16633f1dddbca6eb3c7588b0af30 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Tue, 13 Oct 2026 09:43:21 -0400
Subject: [PATCH] win32: Set the resize flag to match the SetWindowPos() flags

Incorrectly setting this when only changing the window position can early-out of the WM_DPICHANGED handler, and prevent the window size from being properly adjusted when moved between displays with a different scale factor.
---
 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 a13a78c5f24f8..2e904c32a7f9e 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -325,7 +325,7 @@ bool WIN_SetWindowPositionInternal(SDL_Window *window, UINT flags, SDL_WindowRec
 
     WIN_AdjustWindowRect(window, &x, &y, &w, &h, rect_type);
 
-    data->expected_resize = true;
+    data->expected_resize = !(flags & SWP_NOSIZE);
     if (SetWindowPos(hwnd, top, x, y, w, h, flags) == 0) {
         result = WIN_SetError("SetWindowPos()");
     }