Skip to content

Don't check for keyboard modifiers state on a flood of mouse events #4239

@eugenesvk

Description

@eugenesvk

Description

(this is from a discussion from #4235)

Currently Winit performs checks for whether modifiers are changed on every single mouse event, which is rather inefficient as such input devices can generate a lot of events, so you'd be wasting a lot of API calls for key state.
And there are already some guards against missed keyboard/modifier changing events (e.g., if when the app regains focus, Winit checks modifier state), so the question is, could these mouse input checks be replaced by similar guards for the remaining cases where modifier change events are missed?

Unofrunately, I don't know what those are, so just leaving it as an open issue

Not sure about how other platforms do it, so marking this as Windows only

Relevant platforms

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - win32Affects the Win32/Windows backendS - perfA performance issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions