Skip to content

Commit

Permalink
Hack to fix missing window decorations after toggling fullscreen mode…
Browse files Browse the repository at this point in the history
… in Mac OS X 10.10
  • Loading branch information
slouken committed Jul 1, 2015
1 parent 1e3c28a commit e8954d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -1456,6 +1456,11 @@ - (void)resetCursorRects

if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
[nswindow performSelector: @selector(setStyleMask:) withObject: (id)(uintptr_t)GetWindowStyle(window)];

/* Hack to restore window decorations on Mac OS X 10.10 */
NSRect frameRect = [nswindow frame];
[nswindow setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO];
[nswindow setFrame:frameRect display:NO];
} else {
nswindow = Cocoa_RebuildWindow(data, nswindow, GetWindowStyle(window));
}
Expand Down

0 comments on commit e8954d5

Please sign in to comment.