Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 02 Mar 2014 22:16:49 -0500
changeset 82922b0736ab4d5f
parent 8291 36f8cf82d308
child 8293 b96005b05c90
Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP.

(coming back from fullscreen in any state is okay).
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 02 16:36:40 2014 -0500
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 02 22:16:49 2014 -0500
     1.3 @@ -263,8 +263,8 @@
     1.4      SDL_Window *window = _data->window;
     1.5      NSWindow *nswindow = _data->nswindow;
     1.6  
     1.7 -    if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
     1.8 -        return NO;  /* we only allow this on FULLSCREEN_DESKTOP windows. */
     1.9 +    if (state && ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP)) {
    1.10 +        return NO;  /* we only allow you to make a Space on FULLSCREEN_DESKTOP windows. */
    1.11      } else if (![nswindow respondsToSelector: @selector(toggleFullScreen:)]) {
    1.12          return NO;  /* No Spaces support? Older Mac OS X? */
    1.13      } else if (state == isFullscreenSpace) {