From f79d823bcd31686b77cc97b0f5ce8527fa538371 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 8 Aug 2013 13:22:21 -0700 Subject: [PATCH] Backed out changeset 3f487d7d2d1d This breaks applications. --- src/events/SDL_windowevents.c | 7 +++++++ src/video/SDL_video.c | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c index b80afdc87..9011f68e1 100644 --- a/src/events/SDL_windowevents.c +++ b/src/events/SDL_windowevents.c @@ -197,6 +197,13 @@ 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); } diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 8acf3c6c5..bab6c6cb9 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2210,11 +2210,6 @@ SDL_DestroyWindow(SDL_Window * window) } SDL_free(window); - - if (_this->windows == NULL) { - /* This is the last window in the list so send the SDL_QUIT event */ - SDL_SendQuit(); - } } SDL_bool