diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index c7d4f851e..0fe8ceefc 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -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) {