X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7741c4e1f58f2371cde5b558847ee1ec4215a34f..62ea79f3813114bef60645a831f493d96ab6bc33:/src/gtk1/app.cpp?ds=sidebyside diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 52aa11a202..b89d77cd5c 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/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 } @@ -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 {