https://bugs.winehq.org/show_bug.cgi?id=48946
--- Comment #10 from Guillaume guillaume.zin@gmail.com --- In my understanding, get_window_thread is used on device->target then on desktop->foreground_input->active just to compare with message process and check that the message is the for the foreground thread, otherwise it is discarded. Thread object is not used afterwards. But the code is odd in the current state, and I'm clearly not an expert.