Skip to content

Adjust the ModifiersChanged event handling #2768

@kchibisov

Description

@kchibisov

The spec got one more "clarification" lately wrt the keyboard modifiers. Given that our ModifiersChanged event is tied to Focus state, as in on leave we don't have focus and on regaining focus we have modifiers back on.

For winit's event API it simply means that we should send the ModifiersChanged event along side the PointerEnter and PointerLeave events. I'm not sure whether it's a breaking change, but it's something we should consider once we land the #2662 (Keyboard input v2).

The backends should start sending this event when pointer enters the surface of the window, as well as sending it again on keyboard enter/leave.

The good thing is that we still assume the empty state when losing, but then compositor should send the modifiers event again to tell us about the pointer focus. Usually compositors will send
such events related to pointer and keyboard focuses, so we should have internal seat focus inside
the Wayland backend.

For more see:

https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/259

Metadata

Metadata

Assignees

No one assigned

    Labels

    S - apiDesign and usability

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions