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 2509

Summary: Mac: window position calculated incorrectly
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: jorgen
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X (All)   
Attachments: Patch to fix the y-axis of window positions in OS X

Description Alex Szpakowski 2014-04-25 03:05:57 UTC
Created attachment 1633 [details]
Patch to fix the y-axis of window positions in OS X

As of the latest change to window position calculations on Mac OS X (https://hg.libsdl.org/SDL/rev/94af945dbb57), the Y axis of window positions is calculated incorrectly internally - it uses the height of [screen visibleFrame] to flip the y axis, but that height doesn't include the dock height, so window positions are menubar_height + dock_height + pos on the Y axis instead of just menubar_height + pos.

I have attached a small patch which fixes the issue.
Comment 1 (disabled) Jørgen Tjernø 2014-04-25 04:06:53 UTC
Thanks for the report & patch! Submitted in https://hg.libsdl.org/SDL/rev/354dabd2cb58