Description
While testing for #4514 we discovered that every platform we tested behaves a bit differently in some cases.
Moved = PointerMoved, Presence = PointerEntered + PointerLeft, Drag = DragMoved + DragEntered + DragLeft, None = nothing.
Cells marked TODO still need testing. To test, cargo run --example window on your platform of choice, perform the experiment and note which winit events you see in the log.
| Test Case |
Windows |
Linux (X11) |
Linux(Wayland) |
macOS |
| Mouseover with LMB held but empty cursor1 |
None |
Presence (GNOME) |
None (GNOME) |
None |
| Mouseover while holding draggable2 |
Drag (TODO check for Presence/Moved) |
TODO |
TODO |
Moved, Presence, Drag |
| Mouseover while unfocused3 |
Moved, Presence |
Moved, Presence (GNOME) |
Moved, Presence (GNOME) |
Moved, Presence4 |
1.
- Press LMB on desktop/background (not a draggable). (should unfocus the window if it is focused)
- move pointer over window.
- move pointer off of window.
- release LMB.
2.
- Press LMB over a file while focused on the winit window, picking it up for dragging.
- move pointer over window.
- move pointer off of window.
- release LMB.
3.
- unfocus window, pointer off of window.
- move pointer over window.
- move pointer off window.
4.
on winit master with older macOS versions, only Presence is emitted here (due to AppKit treatment of trackingRect), but receiving movement as well is more consistent with other platforms, and #4514 changes the implementation to respect this behavior across all macOS versions.
Relevant platforms
No response
Description
While testing for #4514 we discovered that every platform we tested behaves a bit differently in some cases.
Moved=PointerMoved,Presence=PointerEntered+PointerLeft,Drag=DragMoved+DragEntered+DragLeft,None= nothing.Cells marked TODO still need testing. To test,
cargo run --example windowon your platform of choice, perform the experiment and note which winit events you see in the log.NonePresence(GNOME)None(GNOME)NoneDrag(TODO check forPresence/Moved)Moved,Presence,DragMoved,PresenceMoved,Presence(GNOME)Moved,Presence(GNOME)Moved,Presence41.
2.
3.
4.
on winit
masterwith older macOS versions, onlyPresenceis emitted here (due to AppKit treatment oftrackingRect), but receiving movement as well is more consistent with other platforms, and #4514 changes the implementation to respect this behavior across all macOS versions.Relevant platforms
No response