Skip to content

Commit

Permalink
Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP.
Browse files Browse the repository at this point in the history
(coming back from fullscreen in any state is okay).
  • Loading branch information
icculus committed Mar 3, 2014
1 parent 460f97f commit 86be832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -263,8 +263,8 @@ -(BOOL) setFullscreenSpace:(BOOL) state
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) {
Expand Down

0 comments on commit 86be832

Please sign in to comment.