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 2534 - [Patch] Mac: black bar at top of screen in SDL_WINDOW_FULLSCREEN mode
Summary: [Patch] Mac: black bar at top of screen in SDL_WINDOW_FULLSCREEN mode
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-05-10 21:21 UTC by Alex Szpakowski
Modified: 2014-06-02 16:18 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix the y component of the position of fullscreen windows in OS X. (3.80 KB, patch)
2014-05-10 21:21 UTC, Alex Szpakowski
Details | Diff
Regenerated patch (3.83 KB, patch)
2014-05-19 20:27 UTC, Eric Wasylishen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Szpakowski 2014-05-10 21:21:58 UTC
Created attachment 1643 [details]
Patch to fix the y component of the position of fullscreen windows in OS X.

In Mac OS X with the latest Mercurial code, when a window is in exclusive-fullscreen the y component of its position is offset by the same amount that is normally taken up by the menubar, resulting in a black bar at the top of the screen.

The recent changes to the internal ConvertNSRect function make it treat the bottom of the menubar as 0 for the y component of window positions, even when the window is fullscreen and 'above' the menubar.

I have attached a patch which fixes the issue by only making the window position relative to the menubar in windowed modes.
Comment 1 Eric Wasylishen 2014-05-19 20:27:40 UTC
Created attachment 1655 [details]
Regenerated patch

I can confirm this problem with latest mercurial and OS X 10.9.2. 
To reproduce, run testdraw2 with the command-line arguments "--fullscreen --geometry 1920x1080" (I'm using a 1920x1080 external monitor).

Thanks for the patch Alex, it fixes the problem for me. I had some trouble applying it, so I uploaded my regenerated version - the content of the patch is the same though.
Comment 2 Alex Szpakowski 2014-05-19 20:29:01 UTC
Sorry about that - I forgot to generate it from a clean copy of SDL_cocoawindow.m. :(
Comment 3 Sam Lantinga 2014-06-02 16:18:00 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/98173814b673