1.1 --- a/src/events/SDL_windowevents.c Thu Aug 08 12:49:29 2013 -0700
1.2 +++ b/src/events/SDL_windowevents.c Thu Aug 08 13:22:21 2013 -0700
1.3 @@ -197,6 +197,13 @@
1.4 posted = (SDL_PushEvent(&event) > 0);
1.5 }
1.6
1.7 + if (windowevent == SDL_WINDOWEVENT_CLOSE) {
1.8 + if ( !window->prev && !window->next ) {
1.9 + /* This is the last window in the list so send the SDL_QUIT event */
1.10 + SDL_SendQuit();
1.11 + }
1.12 + }
1.13 +
1.14 return (posted);
1.15 }
1.16
2.1 --- a/src/video/SDL_video.c Thu Aug 08 12:49:29 2013 -0700
2.2 +++ b/src/video/SDL_video.c Thu Aug 08 13:22:21 2013 -0700
2.3 @@ -2210,11 +2210,6 @@
2.4 }
2.5
2.6 SDL_free(window);
2.7 -
2.8 - if (_this->windows == NULL) {
2.9 - /* This is the last window in the list so send the SDL_QUIT event */
2.10 - SDL_SendQuit();
2.11 - }
2.12 }
2.13
2.14 SDL_bool