X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f6b94a33a3d8779c078740b3eae2090015c838a..54f11060867c4c97ebbe7954353f5c311262fc4b:/src/gtk/app.cpp diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 8a762a4c4d..2847577dde 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -54,14 +54,9 @@ static GtkWidget *gs_RootWindow = (GtkWidget*) NULL; // wxYield //----------------------------------------------------------------------------- -// not static because used by textctrl.cpp -// -// MT-FIXME -bool wxIsInsideYield = false; - bool wxApp::Yield(bool onlyIfNeeded) { - if ( wxIsInsideYield ) + if ( m_isInsideYield ) { if ( !onlyIfNeeded ) { @@ -79,7 +74,7 @@ bool wxApp::Yield(bool onlyIfNeeded) } #endif // wxUSE_THREADS - wxIsInsideYield = true; + m_isInsideYield = true; #if wxUSE_LOG // disable log flushing from here because a call to wxYield() shouldn't @@ -103,7 +98,7 @@ bool wxApp::Yield(bool onlyIfNeeded) wxLog::Resume(); #endif - wxIsInsideYield = false; + m_isInsideYield = false; return true; } @@ -204,6 +199,11 @@ bool wxApp::DoIdle() g_source_remove(m_idleSourceId); m_idleSourceId = 0; } + + // Pending events can be added asynchronously, + // need to keep idle source if any have appeared + needMore = needMore || HasPendingEvents(); + // if more idle processing requested if (needMore) { @@ -359,14 +359,8 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_) } #endif // wxUSE_THREADS - // We should have the wxUSE_WCHAR_T test on the _outside_ -#if wxUSE_WCHAR_T // gtk+ 2.0 supports Unicode through UTF-8 strings wxConvCurrent = &wxConvUTF8; -#else // !wxUSE_WCHAR_T - if (!wxOKlibc()) - wxConvCurrent = (wxMBConv*) NULL; -#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T // decide which conversion to use for the file names