X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2286341c8d8c72b3eb65ffe23cfc8756f841b1c3..47678105333557b1a5f225fe57e4ae27fa4b8706:/src/gtk1/app.cpp?ds=inline diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index fcc9087378..b89d77cd5c 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -93,17 +93,25 @@ bool wxYield() while (gtk_events_pending()) gtk_main_iteration(); - /* 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()) { } - if (has_idle) { /* re-add idle handler */ 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()) + ; + + // 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 } @@ -567,7 +573,7 @@ int wxEntry( int argc, char *argv[] ) (gtk_minor_version == 2) && (gtk_micro_version < 4)) { - printf( "wxWindows warning: Disabled GUI threading due to outdated GTK version\n" ); + printf( "wxWindows warning: GUI threading disabled due to outdated GTK version\n" ); } else {