The issue is that a dialog can receive WM_NCACTIVATE(FALSE) when it becomes the active window while not yet foreground, and then never receive WM_NCACTIVATE(TRUE) when it becomes foreground — because set_active_window exits early since the window is already activated. The result is an inactive-looking title bar on what is actually the foreground window. On all other platforms this is corrected by NtUserSetForegroundWindowInternal being called in response to a focus event from the platform's windowing system (FocusIn in X11, equivalents in Wayland and macOS). For wineandroid a focus event handler in WineView would be the right approach, but I plan to replace View-based windowing with a custom GL renderer, so I'd rather not invest in that direction. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10945#note_142224