From e8954d5d8cb6e8303662c81d4ae43b1ad0832bf8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 30 Jun 2015 19:30:02 -0700 Subject: [PATCH] Hack to fix missing window decorations after toggling fullscreen mode in Mac OS X 10.10 --- src/video/cocoa/SDL_cocoawindow.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index dabbf83ce..dc9cefd42 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1456,6 +1456,11 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display 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)); }