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 889 - MacOS mouse positioning anomaly
Summary: MacOS mouse positioning anomaly
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: Other Mac OS X (All)
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 01:16 UTC by Mike
Modified: 2009-12-07 04:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2009-11-19 01:16:29 UTC
Running windowed application under Mac OS X I have some strange behaviour for mouse (cursor) coordinates:

It returns event.button.x = 0; event.button.y = 0 in SDL_MOUSEBUTTONDOWN (/UP | SDL_MOUSEMOTION) when clicking created window. But after I move window (dragging its caption) or under another undefined conditions (I can't figure out what exactly) it begins to return non-zero values (that is still incorrect)

Trying to click on [0,0] pixel - returns [60,10] or so.
Moving window to the most-left position on the screen - x is ok, y - incorrect
Maximised window - works normal (get correct coordinates)
Moving to the right side or on the second display (even when maximised) - totally incorrect coordinates.

It seems that I can get correct coordinates only when window is at the most top-left edge on the first display.

Window is created with SDL_WINDOWPOS_CENTERED and SDL_WINDOW_RESIZABLE flags.

--Mike
Comment 1 Sam Lantinga 2009-12-03 00:57:40 UTC
I think this is fixed in the latest SDL 1.3 snapshot:
http://www.libsdl.org/tmp/SDL-1.3.zip

Can you give it a try and let me know if this is fixed?
Comment 2 Mike 2009-12-07 04:38:54 UTC
The problem was fixed, thanks!

--Mike