| Summary: | SDL_TOUCH_MOUSEID not reported as mouse ID for MacBook Pro trackpad | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Intellectual Kitty <IntellectualKitty> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED ABANDONED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72 |
| Version: | 2.0.5 | ||
| Hardware: | x86 | ||
| OS: | macOS 10.12 | ||
|
Description
Intellectual Kitty
2016-12-31 04:00:10 UTC
The trackpad in macOS is a little tricky. It acts as both a real mouse and an indirect (non-screen) touch surface, and the fact that it's an indirect touch surface means the reported mouse movements and positions can actually have little to do with the reported touch positions and movements. Code that makes use of SDL_TOUCH_MOUSEID will often choose to ignore mouse events in favour of touch events because the touch events directly generated the mouse events (with a 1:1 mapping between touch positions and mouse positions) but this is not the case for the trackpad, and SDL provides no API to determine if a touch device is a direct (touchscreen) or indirect surface. Therefore, simply adding SDL_TOUCH_MOUSEID to trackpad-generated mouse events in macOS may break shipping code and will cause unintuitive behaviour for new code, unless more APIs are added. (In reply to Alex Szpakowski from comment #1) > The trackpad in macOS is a little tricky. It acts as both a real mouse and > an indirect (non-screen) touch surface, and the fact that it's an indirect > touch surface means the reported mouse movements and positions can actually > have little to do with the reported touch positions and movements. An example of this is if I tap once on the left side of the trackpad, lift my finger up, and tap on the right side. The touch APIs will report a press/release in two positions on opposite ends up the device. The mouse API will report no movement. I have a fork of SDL which adds touch device type information (direct versus indirect): https://bitbucket.org/slime73/sdl-experiments/branch/TouchDeviceType Even with those fork's changes, I still think changing Mac trackpad mouse events to generate SDL_TOUCH_MOUSEID is a bad idea for 2.0.x, since it would break a lot of existing apps that don't handle touch device types. Hello, and sorry if you're getting dozens of copies of this message by email. We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc. Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report. So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues. (please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!) Thanks, --ryan. |