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

Summary: SDL2 color cursors are offset on OS X
Product: SDL Reporter: historic_bruno <bb51>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Mac OS X (All)   
Attachments: Test case
Screenshot of game 0 A.D. showing effect of 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.