| Summary: | [Patch] Mac: black bar at top of screen in SDL_WINDOW_FULLSCREEN mode | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | ewasylishen |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X (All) | ||
| Attachments: |
Patch to fix the y component of the position of fullscreen windows in OS X.
Regenerated patch |
||
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.
Sorry about that - I forgot to generate it from a clean copy of SDL_cocoawindow.m. :( Fixed, thanks! http://hg.libsdl.org/SDL/rev/98173814b673 |
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.