Skip to content

Focus event order on Windows #817

@chrisduerr

Description

@chrisduerr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - win32Affects the Win32/Windows backend

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions