X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77fb1a02aac56528bbf3229af32634cc02795906..574d48dbe4abd6596af0933d87463fe1249daddb:/src/gtk1/evtloop.cpp?ds=sidebyside diff --git a/src/gtk1/evtloop.cpp b/src/gtk1/evtloop.cpp index 7d9af25874..8f5dfb1341 100644 --- a/src/gtk1/evtloop.cpp +++ b/src/gtk1/evtloop.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: gtk/evtloop.cpp +// Name: src/gtk1/evtloop.cpp // Purpose: implements wxEventLoop for GTK+ // Author: Vadim Zeitlin // Modified by: @@ -25,7 +25,10 @@ #endif #include "wx/evtloop.h" -#include "wx/app.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif // WX_PRECOMP #include @@ -56,8 +59,6 @@ private: // wxEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - wxEventLoop::~wxEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); @@ -74,6 +75,8 @@ int wxEventLoop::Run() gtk_main(); + OnExit(); + int exitcode = m_impl->GetExitCode(); delete m_impl; m_impl = NULL; @@ -108,10 +111,9 @@ bool wxEventLoop::Pending() const bool wxEventLoop::Dispatch() { - wxCHECK_MSG( IsRunning(), FALSE, _T("can't call Dispatch() if not running") ); + wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") ); gtk_main_iteration(); - return TRUE; + return true; } -