Overwatch 2 calls `FlashWindowEx()` with `dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG` whenever you join an online game or respawn after getting killed. Without this MR the call causes us to send `WM_NCACTIVATE` with `wparam = FALSE`. This confuses the game and it stops reading controller input until you Alt+Tab out and back in to "reactivate" the nonclient area.
`WM_NCACTIVATE` should be only sent when there's `FLASHW_CAPTION` or `FLASHW_STOP` specified.
From: Arkadiusz Hiler ahiler@codeweavers.com
The state of the caption / nonclient area should be only changed when FLASHW_CAPTION or FLASHW_STOP are used. --- dlls/win32u/window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 871227645a7..f008735f2e3 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -4511,11 +4511,11 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info )
win = get_win_ptr( info->hwnd ); if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP) return FALSE; - if (info->dwFlags && !(win->flags & WIN_NCACTIVATED)) + if (info->dwFlags & FLASHW_CAPTION && !(win->flags & WIN_NCACTIVATED)) { win->flags |= WIN_NCACTIVATED; } - else + else if (!info->dwFlags) { win->flags &= ~WIN_NCACTIVATED; } @@ -4536,7 +4536,10 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) else wparam = (hwnd == NtUserGetForegroundWindow());
release_win_ptr( win ); - send_message( hwnd, WM_NCACTIVATE, wparam, 0 ); + + if (!info->dwFlags || info->dwFlags & FLASHW_CAPTION) + send_message( hwnd, WM_NCACTIVATE, wparam, 0 ); + user_driver->pFlashWindowEx( info ); return wparam; }
Commit message typo, should probably be 'unless' :)