https://bugs.winehq.org/show_bug.cgi?id=48946
--- Comment #9 from RĂ©mi Bernon rbernon@codeweavers.com --- I don't think they are right though. If the registered rawinput device has no target window, the messages should be sent to the foreground window. With your changes, "thread = get_window_thread( device->target )" will be NULL in this case and the message will be discarded.
Regarding GloriousEggroll issue, I'm not sure to see how that's ever related to rawinput. If the window is not foreground it isn't supposed to receive any rawinput message, unless RIDEV_INPUTSINK is also implemented, which is done in a different patch series. I will investigate a bit but I'm on something else right now, so it may take a while.