X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43a18898651f71010606d8682fdf88cfc1c02193..f57fe24c6389876d7ddf02aa7a09f3b48a6956de:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 8c006f4e9a..79e667aa01 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -197,6 +197,14 @@ int wxEntry( int argc, char *argv[] ) if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun(); + // flush the logged messages if any + wxLog *pLog = wxLog::GetActiveTarget(); + if ( pLog != NULL && pLog->HasPendingMessages() ) + pLog->Flush(); + + delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used + // for further messages + if (wxTheApp->GetTopWindow()) { delete wxTheApp->GetTopWindow(); @@ -206,6 +214,7 @@ int wxEntry( int argc, char *argv[] ) wxTheApp->DeletePendingObjects(); wxTheApp->OnExit(); + wxApp::CleanUp(); @@ -294,7 +303,7 @@ void wxApp::ProcessXEvent(WXEvent* _event) { XEvent* event = (XEvent*) _event; - if (CheckForAccelerator(_event)) + if ((event->type == KeyPress) && CheckForAccelerator(_event)) { // Do nothing! We intercepted and processed the event as an accelerator. return;