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
1 changed files with 2 additions and 2 deletions

View File

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