SDL: Let Windows track floating window state

From f0b9c7f0f0122d8a8275b68da8d817708c9d4d7a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 12 Jan 2024 10:03:13 -0800
Subject: [PATCH] Let Windows track floating window state

This fixes restoring window size and position after moving it to a tiled location (which isn't maximized) and then back.
---
 src/video/windows/SDL_windowsevents.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index bfbf93dc0579..60453ba8fb7b 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -1087,21 +1087,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
     case WM_WINDOWPOSCHANGING:
     {
-        WINDOWPOS *windowpos = (WINDOWPOS*)lParam;
-        if (!IsIconic(hwnd) &&
-            !IsZoomed(hwnd) &&
-            (data->window->flags & (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED)) &&
-            !(data->window->flags & SDL_WINDOW_FULLSCREEN)) {
-            /* Use the stored floating size if moving from a fixed-size to floating state. */
-            int fx, fy, fw, fh;
-
-            WIN_AdjustWindowRect(data->window, &fx, &fy, &fw, &fh, SDL_WINDOWRECT_FLOATING);
-            windowpos->x = fx;
-            windowpos->y = fy;
-            windowpos->cx = fw;
-            windowpos->cy = fh;
-            windowpos->flags &= ~(SWP_NOSIZE | SWP_NOMOVE);
-        }
     } break;
 
     case WM_WINDOWPOSCHANGED: