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();
wxTheApp->DeletePendingObjects();
wxTheApp->OnExit();
+
wxApp::CleanUp();
{
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;