mirror of https://github.com/encounter/SDL.git
Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP.
(coming back from fullscreen in any state is okay).
This commit is contained in:
parent
460f97ff96
commit
86be83215a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue