Rémi Bernon (@rbernon) commented about dlls/win32u/input.c:
for (phwnd = list; *phwnd; phwnd++) { if (get_window_thread( *phwnd, NULL ) == old_thread)
send_message( *phwnd, WM_ACTIVATEAPP, 0, new_thread );
How do we end up in the case where new_thread is 0 exactly? Is this because of a `SetForegroundWindow( 0 )` call or `SetActiveWindow( 0 )`?
Fwiw I believe that `SetForegroundWindow( 0 )` is supposed to relinquish foreground, but it's not supposed to make it dangling, and Windows implements it by giving it to a different window/process.