X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02761f6cd478e3c2c97cf6f93442747f7b029833..9d8fe14a97d1092989eecbe43c4e1f730fba17ad:/src/motif/evtloop.cpp diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 79a49240f1..a3e4b54dea 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -17,14 +17,14 @@ // headers // ---------------------------------------------------------------------------- +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #ifdef __VMS #define XtParent XTPARENT #define XtDisplay XTDISPLAY #endif -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - #ifndef WX_PRECOMP #include "wx/event.h" #include "wx/app.h" @@ -101,12 +101,12 @@ bool wxEventLoopImpl::SendIdleMessage() // wxEventLoop 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") ); @@ -122,6 +122,8 @@ int wxEventLoop::Run() break; } + OnExit(); + int exitcode = m_impl->GetExitCode(); delete m_impl; m_impl = NULL; @@ -129,7 +131,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") ); @@ -143,12 +145,12 @@ void wxEventLoop::Exit(int rc) // wxEventLoop message processing dispatching // ---------------------------------------------------------------------------- -bool wxEventLoop::Pending() const +bool wxGUIEventLoop::Pending() const { return XtAppPending( (XtAppContext)wxTheApp->GetAppContext() ) != 0; } -bool wxEventLoop::Dispatch() +bool wxGUIEventLoop::Dispatch() { XEvent event; XtAppContext context = (XtAppContext)wxTheApp->GetAppContext(); @@ -336,7 +338,7 @@ bool CheckForKeyUp(XEvent* event) // executes one main loop iteration (declared in include/wx/motif/private.h) // ---------------------------------------------------------------------------- -bool wxDoEventLoopIteration( wxEventLoop& evtLoop ) +bool wxDoEventLoopIteration( wxGUIEventLoop& evtLoop ) { bool moreRequested, pendingEvents;