From 5eccbac4b9c284e7251fca6fe3e821eea879f8b5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 2 Mar 2014 15:35:24 -0500 Subject: [PATCH] Mac: Manage menubar and dock as FULLSCREEN_DESKTOP windows become/resign key. --- src/video/cocoa/SDL_cocoawindow.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index f6b584332..5f28c19f1 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -508,6 +508,10 @@ SetWindowStyle(SDL_Window * window, unsigned int style) /* Check to see if someone updated the clipboard */ Cocoa_CheckClipboardUpdate(_data->videodata); + + if (isFullscreenSpace) { + [NSMenu setMenuBarVisible:NO]; + } } - (void)windowDidResignKey:(NSNotification *)aNotification @@ -526,6 +530,10 @@ SetWindowStyle(SDL_Window * window, unsigned int style) if (SDL_GetKeyboardFocus() == _data->window) { SDL_SetKeyboardFocus(NULL); } + + if (isFullscreenSpace) { + [NSMenu setMenuBarVisible:YES]; + } } - (void)windowWillEnterFullScreen:(NSNotification *)aNotification