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 - Mac: window position calculated incorrectly
Summary: Mac: window position calculated incorrectly
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-25 03:05 UTC by Alex Szpakowski
Modified: 2014-04-25 04:06 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix the y-axis of window positions in OS X (490 bytes, patch)
2014-04-25 03:05 UTC, Alex Szpakowski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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