Send the SDL_QUIT when last window is destroyed, not during its close event.

--HG--
extra : rebase_source : 1a30ff486e98282c7d6a05d64eea0c4f3e026c41
This commit is contained in:
Ryan C. Gordon 2013-08-08 12:49:29 -07:00
parent cf76f36660
commit f3280d289a
2 changed files with 5 additions and 7 deletions

View file

@ -197,13 +197,6 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
posted = (SDL_PushEvent(&event) > 0);
}
if (windowevent == SDL_WINDOWEVENT_CLOSE) {
if ( !window->prev && !window->next ) {
/* This is the last window in the list so send the SDL_QUIT event */
SDL_SendQuit();
}
}
return (posted);
}