Rémi Bernon (@rbernon) commented about dlls/win32u/window.c:
NtUserShowCaret( winpos->hwnd ); }
- if (!(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)))
- if (!(winpos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) && get_active_window() != winpos->hwnd)
Rather than doing that unconditionally, which may not be always correct (it's not because the window is the thread's active window that it's also the current foreground window), I think this should be dependent on what is currently happening.
I understand that the issue exists when WM_ACTIVATE message is being sent, which happens during window activation and deactivation (with different wparam), and we only want to prevent re-activation if the window is being deactivated, not in other cases.