rust-windowing / rust-windowing/winit
set_cursor_position affects mouse event deltas [macos]
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Calling set_cursor_position does not generate a DeviceEvent::MouseMotion event, but the change in position is added to the delta of the next MouseMotion event.
This is inconvenient to deal with in a client app, since I don't see a (straightforward) way to retrieve the cursor position (i.e. there isn't a simple get_cursor_position), and hence it's complicated to figure out the delta that needs to be subtracted from the next MouseMotion event.
Behaviour only noted on a Mac. Does not repro on Windows.
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.
Research direction
No files or tests are identified in the issue. Start by reproducing the behavior on macOS and trace set_cursor_position together with the next DeviceEvent::MouseMotion; done means programmatic cursor movement no longer alters that event's reported delta.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100