X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb65642cd4f27c7ecfbb642043364ac10b9f672c..5f9fd7ea86d211e3681a71c9f70303aa72b5de3c:/src/gtk/app.cpp diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index bd85f4f6a2..b89d77cd5c 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -99,10 +99,18 @@ bool wxYield() wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL ); } + // disable log flushing from here because a call to wxYield() shouldn't + // normally result in message boxes popping up &c + wxLog::Suspend(); + /* it's necessary to call ProcessIdle() to update the frames sizes which might have been changed (it also will update other things set from OnUpdateUI() which is a nice (and desired) side effect) */ - while (wxTheApp->ProcessIdle()) { } + while (wxTheApp->ProcessIdle()) + ; + + // let the logs be flashed again + wxLog::Resume(); return TRUE; } @@ -380,9 +388,7 @@ void wxApp::OnIdle( wxIdleEvent &event ) /* flush the logged messages if any */ #if wxUSE_LOG - wxLog *log = wxLog::GetActiveTarget(); - if (log != NULL && log->HasPendingMessages()) - log->Flush(); + wxLog::FlushActive(); #endif // wxUSE_LOG }