| Summary: | Mac: SDL_FINGERUP events don't always trigger (touch presses get "stuck") | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | events | Assignee: | (disabled) Jørgen Tjernø <jorgen> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | jorgen |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X (All) | ||
| Attachments: | Patch to fix Cocoa code for cancelled touches | ||
Thanks, applied your patch in http://hg.libsdl.org/SDL/rev/4e3e41b2cbfb |
Created attachment 1521 [details] Patch to fix Cocoa code for cancelled touches In Mac OS X (10.9.1) when using my trackpad, touch finger presses are recognized correctly but sometimes SDL_FINGERUP isn't triggered when I remove my finger. This results in a buildup of "active" fingers (according to SDL). This seems to happen when my trackpad finger movements are recognized as a global gesture by OS X (e.g. when I swipe several fingers up for exposé actions), and when I have fingers pressed on the trackpad when switching away from the SDL program with command-tab. I believe I found a bug in SDL's Cocoa code which causes the latter case: Cocoa's NSTouchPhaseCancelled touch events aren't handled properly by SDL. I've attached a patch which fixes that code and seems to fix the case where SDL_FINGERUP events aren't triggered properly when switching away from the SDL application, but it doesn't fix the case where SDL_FINGERUP events aren't triggered after doing a global OS X gesture with the SDL application active.