From 7f8e2dd7e86c53a4b0c7471868ba46f8450ce1e6 Mon Sep 17 00:00:00 2001 From: aquanull Date: Thu, 5 Apr 2018 18:46:19 +0800 Subject: [PATCH] Fixes the focus bug of the main window minimized with clicks on Windows Taskbar. --- src/drivers/win/window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index 5fc4583b..b9dd376b 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -1443,7 +1443,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) goto proco; case WM_SIZE: - if (!fullscreen && !changerecursive && !windowedfailed) + if (wParam == SIZE_MINIMIZED) + nofocus = 1; + else if (!fullscreen && !changerecursive && !windowedfailed) { switch(wParam) { @@ -2420,6 +2422,7 @@ adelikat: Outsourced this to a remappable hotkey DoFCEUExit(); break; case WM_SETFOCUS: + nofocus = 0; if (wasPausedByCheats) { EmulationPaused = 0;