src/video/SDL_video.c
changeset 9906 49c432b1897b
parent 9905 fcf85090f816
child 9924 355cccccc7dc
equal deleted inserted replaced
9905:fcf85090f816 9906:49c432b1897b
  1136     /* if we are in the process of hiding don't go back to fullscreen */
  1136     /* if we are in the process of hiding don't go back to fullscreen */
  1137     if ( window->is_hiding && fullscreen )
  1137     if ( window->is_hiding && fullscreen )
  1138         return 0;
  1138         return 0;
  1139 
  1139 
  1140 #ifdef __MACOSX__
  1140 #ifdef __MACOSX__
       
  1141     /* if the window is going away and no resolution change is necessary,
       
  1142      do nothing, or else we may trigger an ugly double-transition
       
  1143      */
       
  1144     if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)
       
  1145         return 0;
       
  1146     
  1141     /* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
  1147     /* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
  1142     if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
  1148     if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
  1143         if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
  1149         if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
  1144             return -1;
  1150             return -1;
  1145         }
  1151         }