From 9a5c9a0cde169e5f5c7a2766b495d8d82c5628dc Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 2 Nov 2006 19:05:39 +0000 Subject: [PATCH] don't reset idle tag unless idle function is also going to be removed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 9be1cb13bf..3f6f2920c5 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -224,16 +224,6 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) ) // thread so we must lock it here ourselves. gdk_threads_enter(); - // Indicate that we are now in idle mode and event handlers - // will have to reinstall the idle handler again. - { -#if wxUSE_THREADS - wxMutexLocker lock(gs_idleTagsMutex); -#endif - g_isIdle = true; - wxTheApp->m_idleTag = 0; - } - bool moreIdles; // Send idle event to all who request them as long as @@ -245,7 +235,17 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) ) gdk_threads_leave(); if (!moreIdles) + { +#if wxUSE_THREADS + wxMutexLocker lock(gs_idleTagsMutex); +#endif + // Indicate that we are now in idle mode and event handlers + // will have to reinstall the idle handler again. + g_isIdle = true; + wxTheApp->m_idleTag = 0; + wxAddEmissionHook(); + } // Return FALSE if no more idle events are to be sent return moreIdles; -- 2.47.2