src/events/SDL_windowevents.c
changeset 5113 686d795b1b29
parent 5042 8c39b82dc7b0
child 5147 ad50b3db78bd
     1.1 --- a/src/events/SDL_windowevents.c	Thu Jan 27 14:54:20 2011 -0800
     1.2 +++ b/src/events/SDL_windowevents.c	Thu Jan 27 15:58:30 2011 -0600
     1.3 @@ -176,6 +176,14 @@
     1.4  
     1.5          posted = (SDL_PushEvent(&event) > 0);
     1.6      }
     1.7 +	
     1.8 +	if (windowevent == SDL_WINDOWEVENT_CLOSE) {
     1.9 +		if ( !window->prev && !window->next ) {
    1.10 +			// This is the last window in the list so send the SDL_QUIT event
    1.11 +			SDL_SendQuit();
    1.12 +		}
    1.13 +	}
    1.14 +
    1.15      return (posted);
    1.16  }
    1.17