Mac: Manage menubar and dock as FULLSCREEN_DESKTOP windows become/resign key.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 02 Mar 2014 15:35:24 -0500
changeset 82884e3afa79b8d8
parent 8287 fee216d949e3
child 8289 d2acd700f8f7
Mac: Manage menubar and dock as FULLSCREEN_DESKTOP windows become/resign key.
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 02 14:59:06 2014 -0500
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 02 15:35:24 2014 -0500
     1.3 @@ -508,6 +508,10 @@
     1.4  
     1.5      /* Check to see if someone updated the clipboard */
     1.6      Cocoa_CheckClipboardUpdate(_data->videodata);
     1.7 +
     1.8 +    if (isFullscreenSpace) {
     1.9 +        [NSMenu setMenuBarVisible:NO];
    1.10 +    }
    1.11  }
    1.12  
    1.13  - (void)windowDidResignKey:(NSNotification *)aNotification
    1.14 @@ -526,6 +530,10 @@
    1.15      if (SDL_GetKeyboardFocus() == _data->window) {
    1.16          SDL_SetKeyboardFocus(NULL);
    1.17      }
    1.18 +
    1.19 +    if (isFullscreenSpace) {
    1.20 +        [NSMenu setMenuBarVisible:YES];
    1.21 +    }
    1.22  }
    1.23  
    1.24  - (void)windowWillEnterFullScreen:(NSNotification *)aNotification