From b937c54b665f134f241313eb45a4e0110807ae2c Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Fri, 15 Dec 2023 15:54:01 -0500 Subject: [PATCH] win32: Set all size and position variables for external windows --- src/video/windows/SDL_windowswindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index b59d2495b3..ef93a9a55c 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -361,8 +361,8 @@ static int SetupWindowData(SDL_VideoDevice *_this, SDL_Window *window, HWND hwnd int h = rect.bottom; if (window->flags & SDL_WINDOW_EXTERNAL) { - window->windowed.w = window->w = w; - window->windowed.h = window->h = h; + window->floating.w = window->windowed.w = window->w = w; + window->floating.h = window->windowed.h = window->h = h; } else if ((window->windowed.w && window->windowed.w != w) || (window->windowed.h && window->windowed.h != h)) { /* We tried to create a window larger than the desktop and Windows didn't allow it. Override! */ int x, y; @@ -384,8 +384,8 @@ static int SetupWindowData(SDL_VideoDevice *_this, SDL_Window *window, HWND hwnd point.y = 0; if (ClientToScreen(hwnd, &point)) { if (window->flags & SDL_WINDOW_EXTERNAL) { - window->windowed.x = point.x; - window->windowed.y = point.y; + window->floating.x = window->windowed.x = point.x; + window->floating.y = window->windowed.y = point.y; } window->x = point.x; window->y = point.y;