Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP.

(coming back from fullscreen in any state is okay).
This commit is contained in:
Ryan C. Gordon 2014-03-02 22:16:49 -05:00
parent 460f97ff96
commit 86be83215a

View File

@ -263,8 +263,8 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
SDL_Window *window = _data->window; SDL_Window *window = _data->window;
NSWindow *nswindow = _data->nswindow; NSWindow *nswindow = _data->nswindow;
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) { if (state && ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP)) {
return NO; /* we only allow this on FULLSCREEN_DESKTOP windows. */ return NO; /* we only allow you to make a Space on FULLSCREEN_DESKTOP windows. */
} else if (![nswindow respondsToSelector: @selector(toggleFullScreen:)]) { } else if (![nswindow respondsToSelector: @selector(toggleFullScreen:)]) {
return NO; /* No Spaces support? Older Mac OS X? */ return NO; /* No Spaces support? Older Mac OS X? */
} else if (state == isFullscreenSpace) { } else if (state == isFullscreenSpace) {