We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3113 - SDL2 color cursors are offset on OS X
Summary: SDL2 color cursors are offset on OS X
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-06 19:59 UTC by historic_bruno
Modified: 2015-09-06 20:01 UTC (History)
0 users

See Also:


Attachments
Test case (3.15 KB, text/x-csrc)
2015-09-06 19:59 UTC, historic_bruno
Details
Screenshot of game 0 A.D. showing effect of bug (46.65 KB, image/png)
2015-09-06 20:01 UTC, historic_bruno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description historic_bruno 2015-09-06 19:59:07 UTC
Created attachment 2258 [details]
Test case

As reported here: https://forums.libsdl.org/viewtopic.php?t=11308

On every version of OS X I've tested, SDL2 color cursors (created by SDL_CreateColorCursor and SDL_CreateRGBSurfaceFrom) appear offset by about 3 pixels in both x and y directions. I'll attach some sample code, which works perfectly with no offsets on Linux and Windows. I'll also attach a screenshot from the game 0 A.D. with overlays to show the effect on our GUI interaction.

I tried to work around the offset by decreasing the x and y hotspot values passed to SDL_CreateColorCursor, but this caused an ugly black rectangle to follow the cursor on Yosemite (perhaps another bug?)
Comment 1 historic_bruno 2015-09-06 20:01:58 UTC
Created attachment 2259 [details]
Screenshot of game 0 A.D. showing effect of bug

Here is a screenshot showing a button in the game 0 A.D.'s UI, with a green overlay of where the cursor should activate the button, as it does on Linux and Windows. The red overlay shows where the cursor appears to activate the button on OS X.