From 6c1c7e4f343fdf00726f3f0a7052d985e7da7fd2 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 28 Aug 2021 17:08:48 +0100 Subject: [PATCH] hw/xwin: Allow DefWindowProc to SetFocus() as needed after WM_ACTIVE Don't indicate we've processed WM_ACTIVATE, so DefWindowProc can do not-clearly specified default things with the focus. Part-of: --- hw/xwin/winmultiwindowwndproc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 0fea29015..77a038e12 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -911,11 +911,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); - /* Prevent the mouse wheel from stalling when another window is minimized */ - if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE && - (HWND) lParam != NULL && (HWND) lParam != GetParent(hwnd)) - SetFocus(hwnd); - return 0; + /* Allow DefWindowProc to SetFocus() as needed */ + break; case WM_ACTIVATEAPP: /*