X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..815399d5bb73387364936a85a61e33cdbfb81193:/src/gtk1/evtloop.cpp diff --git a/src/gtk1/evtloop.cpp b/src/gtk1/evtloop.cpp index b610e01a75..4364bb3122 100644 --- a/src/gtk1/evtloop.cpp +++ b/src/gtk1/evtloop.cpp @@ -52,19 +52,19 @@ private: }; // ============================================================================ -// wxEventLoop implementation +// wxGUIEventLoop implementation // ============================================================================ // ---------------------------------------------------------------------------- -// wxEventLoop running and exiting +// wxGUIEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop::~wxEventLoop() +wxGUIEventLoop::~wxGUIEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); } -int wxEventLoop::Run() +int wxGUIEventLoop::Run() { // event loops are not recursive, you need to create another loop! wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") ); @@ -75,6 +75,8 @@ int wxEventLoop::Run() gtk_main(); + OnExit(); + int exitcode = m_impl->GetExitCode(); delete m_impl; m_impl = NULL; @@ -82,7 +84,7 @@ int wxEventLoop::Run() return exitcode; } -void wxEventLoop::Exit(int rc) +void wxGUIEventLoop::Exit(int rc) { wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") ); @@ -95,7 +97,7 @@ void wxEventLoop::Exit(int rc) // wxEventLoop message processing dispatching // ---------------------------------------------------------------------------- -bool wxEventLoop::Pending() const +bool wxGUIEventLoop::Pending() const { if (wxTheApp) { @@ -107,7 +109,7 @@ bool wxEventLoop::Pending() const return gtk_events_pending(); } -bool wxEventLoop::Dispatch() +bool wxGUIEventLoop::Dispatch() { wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );