From b7a44983b432a85f99b5d82493c3396e5833d245 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Mon, 1 Mar 2021 23:18:53 +0100 Subject: [PATCH] Fix: [Win32] Original window size was lost when tabbing in and out of fullscreen. --- src/video/win32_v.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index d5f752be97..8200be887b 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -715,7 +715,9 @@ LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (video_driver->fullscreen) { if (active && minimized) { /* Restore the game window */ + Dimension d = _bck_resolution; // Save current non-fullscreen window size as it will be overwritten by ShowWindow. ShowWindow(hwnd, SW_RESTORE); + _bck_resolution = d; video_driver->MakeWindow(true); } else if (!active && !minimized) { /* Minimise the window and restore desktop */