From: Santino Mazza <smazza(a)codeweavers.com> This fixes a difference in behavior between Wine and Windows, where in Wine it's possible to immediatly reactivate a window by calling SetWindowPos or SetForegroundWindow inside the WM_ACTIVATE handler. In Windows this isn't possible. --- dlls/win32u/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index d5ecbb33958..0b7d745d30d 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2207,6 +2207,7 @@ BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DWORD new_thread_id; HWND previous = 0; + if (win_get_flags(hwnd) & WIN_IS_DEACTIVATING) return TRUE; if (mouse) hwnd = get_full_window_handle( hwnd ); new_thread_id = get_window_thread( hwnd, NULL ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9398