Opened 10 years ago

Last modified 3 years ago

#2851 assigned defect

SDL2: Cursor offset on OS X

Reported by: historic_bruno Owned by: trompetin17
Priority: Must Have Milestone: Backlog
Component: Core engine Keywords: mac
Cc: wraitii Patch:

Description

In my testing, the cursor is offset by about 3 pixels from left and top, so e.g. buttons aren't hovered properly. In fullscreen mode, it can be seen that the cursor stops that far from the edge of the screen in the top left corner.

Attachments (3)

2851.diff (472 bytes ) - added by trompetin17 9 years ago.
a23-bug-start.png (53.1 KB ) - added by Krinkle 5 years ago.
a23-bug-end.png (53.7 KB ) - added by Krinkle 5 years ago.

Download all attachments as: .zip

Change History (20)

by trompetin17, 9 years ago

Attachment: 2851.diff added

comment:1 by trompetin17, 9 years ago

Keywords: review patch added
Milestone: BacklogAlpha 18
Owner: set to trompetin17
Status: newassigned
Summary: SDL2: Cursor offset on OS X[PATCH] SDL2: Cursor offset on OS X

Tested in my yosemite in full screen mode

comment:2 by historic_bruno, 9 years ago

Eventually we should use SDL_WINDOW_FULLSCREEN on all platforms, but there were bugs preventing that. At least for OS X, most or all of those are fixed in SDL Hg, so I think this patch is fine.

I would also like to see if this has been reported or fixed upstream, and if not, submit a bug report.

comment:3 by historic_bruno, 9 years ago

Doesn't fix the problem for me in Yosemite. I also tested a more recent SDL2 Hg version and the problem still exists.

comment:4 by Stan, 9 years ago

Milestone: Alpha 18Alpha 19

comment:5 by leper, 9 years ago

Keywords: review removed

comment:6 by historic_bruno, 9 years ago

trompetin17 and I discussed this, he was thinking of a different issue, but he confirmed this bug occurs for him too.

The weird thing is using the Grab tool, one can see the OS X cursor is in the correct location relative to our UI. Something is affecting the rendering of the color cursor. I've tried converting the intermediate SDL surface to a texture and rendering it at 0,0 - it looks fine (no 3 pixel offset). The raw pixel data is 32x32, as expected for the default cursor. I also don't see any wrong parameters being passed to Cocoa by SDL.

comment:7 by historic_bruno, 9 years ago

I reported this on the SDL forum with a minimal test case: https://forums.libsdl.org/viewtopic.php?p=48194

comment:8 by historic_bruno, 9 years ago

Reported on SDL Bugzilla since the forum discussion didn't find a solution: https://bugzilla.libsdl.org/show_bug.cgi?id=3113

comment:9 by Stan, 9 years ago

Still no answers...

comment:10 by historic_bruno, 9 years ago

Milestone: Alpha 19Backlog

comment:11 by historic_bruno, 9 years ago

Backlogging this because the cause is unknown, the patch here is unrelated, and we seem to be waiting for SDL to investigate this further. It's not a release blocker IMO.

comment:12 by Stan, 9 years ago

Keywords: patch removed
Summary: [PATCH] SDL2: Cursor offset on OS XSDL2: Cursor offset on OS X

comment:13 by historic_bruno, 5 years ago

I don't see this bug anymore with latest SVN, currently testing on macOS 10.14.

Can anyone else confirm?

comment:14 by wraitii, 5 years ago

Cc: wraitii added

Will test but I don't recall it either at a glance

comment:15 by Krinkle, 5 years ago

Keywords: mac added

comment:16 by Krinkle, 5 years ago

In the game setup, this is still reproducible for me on macOS 10.14. Both with A23 (2018-12-13) and with latest SVN (A24 r22452).

The menu buttons start about 3px too far down, and they remain in hovered/clickable state until about 3px below where the menu item visually ended.

by Krinkle, 5 years ago

Attachment: a23-bug-start.png added

by Krinkle, 5 years ago

Attachment: a23-bug-end.png added

comment:17 by wraitii, 3 years ago

This _might_ still be happening but I can't notice it visually on HighDPI monitors.

Last edited 3 years ago by wraitii (previous) (diff)
Note: See TracTickets for help on using tickets.