| Summary: | SDL detects right-click events as left-click with Wacom devices in OS X | ||
|---|---|---|---|
| Product: | SDL | Reporter: | duane_moody |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED ABANDONED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | 2.0.4 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X 10.10 | ||
|
Description
duane_moody
2016-06-11 18:46:50 UTC
retval |= (cocoaButtons & (1 << 0)) ? SDL_BUTTON_LMASK : 0;
retval |= (cocoaButtons & (1 << 1)) ? SDL_BUTTON_RMASK : 0;
retval |= (cocoaButtons & (1 << 2)) ? SDL_BUTTON_MMASK : 0;
retval |= (cocoaButtons & (1 << 3)) ? SDL_BUTTON_X1MASK : 0;
retval |= (cocoaButtons & (1 << 4)) ? SDL_BUTTON_X2MASK : 0;
I'm throwing out a guess that the above snippet from SDL_cocoamouse.m's Cocoa_GetGlobalMouseState() which tests pressedMouseButtons is incorrect in how it compares cocoaButtons against the button bitmasks, each statement will always evaluate to false, and as a result will always return 0 (SDL_BUTTON_LMASK).
Following the example in https://webkit.googlesource.com/WebKit/+/master/Source/WebKit2/Shared/mac/WebEventFactory.mm the equivalent codeblock would be
retval |= (cocoaButtons = 1 << 0) ? SDL_BUTTON_LMASK : 0;
retval |= (cocoaButtons = 1 << 1) ? SDL_BUTTON_RMASK : 0;
retval |= (cocoaButtons = 1 << 2) ? SDL_BUTTON_MMASK : 0;
retval |= (cocoaButtons = 1 << 3) ? SDL_BUTTON_X1MASK : 0;
retval |= (cocoaButtons = 1 << 4) ? SDL_BUTTON_X2MASK : 0;
Hopefully the ternary logic and/or the |= assignation aren't the problem here.
SDL_GetGlobalMouseState() seems not used in the linked source of GZDoom. An it seems not to use SDL 2. :) (In reply to Philipp Wiesemann from comment #3) > An it seems not to use SDL 2. :) I stand corrected, GZDoom uses 1.2.15 but the error involving tablet events is consistent between 1.2.x and 2.x. https://www.renpy.org/latest.html The Ren'Py 6.99.10 SDK for OS X contains Renpy.app: when run, select The Question from the Projects menu and then click Launch Project to start the demo. Right-clicking anywhere on the screen should bring up a screen for saving game progress. Using a tablet, it only progresses the text as left-click would. Renpy.app uses SDL2 2.0.0. Older SDL games using SDL 1.2 such as Battle for Wesnoth demonstrate the issue; in contrast no Wx- or Qt-based applications do. I can only reproduce the error with SDL-based software. My apologies for being so far unable to pinpoint the underlying cause. 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. |