Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix fullscreen origin on Mac OS X 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 26, 2011
1 parent 881fa5f commit 4b08854
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -823,6 +823,12 @@ - (void)rightMouseDown:(NSEvent *)theEvent
rect.size.height = bounds.h;
ConvertNSRect(&rect);

/* Hack to fix origin on Mac OS X 10.4 */
NSRect screenRect = [[nswindow screen] frame];
if (screenRect.size.height >= 1.0f) {
rect.origin.y += (screenRect.size.height - rect.size.height);
}

if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
[nswindow performSelector: @selector(setStyleMask:) withObject: (id)NSBorderlessWindowMask];
} else {
Expand Down

0 comments on commit 4b08854

Please sign in to comment.