From 86be83215a3fc893957eece8fa5d433e07ba1579 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 2 Mar 2014 22:16:49 -0500 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {