Document or unify some edge case behaviors between platforms with mouse pointers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- desktop, operating-systems
Research direction
Start with cargo run --example window on the available platforms and repeat the three pointer experiments described in the issue, recording the events shown in the log. Fill the TODO cells with observed results, then determine from the project discussion whether the completed work should document the differences or unify the behavior; the table and its footnotes should clearly reflect the result.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-windowing/winit
-
B - bug DS - appkit
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
rust-windowing/winit#4666 · 1 comment ·
-
DS - x11
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rust-windowing/winit#4479 · 5 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
rust-windowing/winit#4701 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
rust-windowing/winit#4698 · 2 comments ·
-
B - bug DS - win32
Difficulty 3/5 1-2 days Newbie friendliness 35/100
rust-windowing/winit#4691 ·
All issues in rust-windowing/winit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100