rust-windowing / rust-windowing/winit
iOS: `FingerId` may not be stable
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
I think it may be prudent to use touch.hash() (importing NSObjectProtocol) instead of just converting to a pointer and comparing the address? I'm not entirely sure that the ID will be consistent otherwise, UITouch seems to be an immutable container that also contains e.g. the location of the current touch (so it'll probably change next time we process the specific touch).
Firefox' code seems to rely on inserting the UITouch into a hashmap, to store a stable identifier, so perhaps that's actually what we need to do?
Found while reviewing https://github.com/rust-windowing/winit/pull/3947.
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
Start by reviewing the FingerId implementation and the referenced winit PR 3947, then compare its UITouch handling with Firefox's nsWindow.mm code. Determine whether pointer conversion or touch.hash() provides a stable identifier, and confirm that the chosen approach keeps the same touch mapped to one FingerId across processing updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, rust
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100