src/video/SDL_video.c
changeset 9037 e9d67ac0c6f8
parent 8953 dc80dc0bd22e
child 9127 a8c38ed1a674
     1.1 --- a/src/video/SDL_video.c	Wed Jul 30 14:14:19 2014 -0400
     1.2 +++ b/src/video/SDL_video.c	Wed Jul 30 17:45:52 2014 -0700
     1.3 @@ -1105,6 +1105,10 @@
     1.4  
     1.5      CHECK_WINDOW_MAGIC(window,);
     1.6  
     1.7 +    /* if we are in the process of hiding don't go back to fullscreen */
     1.8 +    if ( window->is_hiding && fullscreen )
     1.9 +        return;
    1.10 +    
    1.11  #ifdef __MACOSX__
    1.12      if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
    1.13          window->last_fullscreen_flags = window->flags;
    1.14 @@ -1833,11 +1837,13 @@
    1.15          return;
    1.16      }
    1.17  
    1.18 +	window->is_hiding = SDL_TRUE;
    1.19      SDL_UpdateFullscreenMode(window, SDL_FALSE);
    1.20  
    1.21      if (_this->HideWindow) {
    1.22          _this->HideWindow(_this, window);
    1.23      }
    1.24 +	window->is_hiding = SDL_FALSE;
    1.25      SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
    1.26  }
    1.27