While trying to fix alacritty/alacritty#2170, I've just noticed that the event order of the Focused event is a bit different on Windows compared to the other platforms.
Even though window focus on Windows can only be changed when clicking on a window, the Focused events comes before the MouseInput event. They aren't coming in the same bulk either so the order isn't only messed up but they're coming in completely disconnected from each other in short succession.
The issue with this is that it makes it impossible to determine if a MouseInput event was on a focused or unfocused window. So clicks on unfocused windows can't easily be ignored.
I'm not sure if this is an issue with winit or a constraint due to the Windows API, but this is probably the best place to ask.
While trying to fix alacritty/alacritty#2170, I've just noticed that the event order of the
Focusedevent is a bit different on Windows compared to the other platforms.Even though window focus on Windows can only be changed when clicking on a window, the
Focusedevents comes before theMouseInputevent. They aren't coming in the same bulk either so the order isn't only messed up but they're coming in completely disconnected from each other in short succession.The issue with this is that it makes it impossible to determine if a
MouseInputevent was on a focused or unfocused window. So clicks on unfocused windows can't easily be ignored.I'm not sure if this is an issue with winit or a constraint due to the Windows API, but this is probably the best place to ask.