git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41082
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif // __WXDEBUG__
guint m_idleTag;
#endif // __WXDEBUG__
guint m_idleTag;
+ void RemoveIdleSource();
// Used by the the wxGLApp and wxGLCanvas class for GL-based X visual
// selection.
// Used by the the wxGLApp and wxGLCanvas class for GL-based X visual
// selection.
// We need to remove idle callbacks or the loop will
// never finish.
// We need to remove idle callbacks or the loop will
// never finish.
- wxTheApp->RemoveIdleTag();
#if wxUSE_LOG
// disable log flushing from here because a call to wxYield() shouldn't
#if wxUSE_LOG
// disable log flushing from here because a call to wxYield() shouldn't
+static inline void wxAddEmissionHook()
+{
+ // add emission hook for "event" signal, to re-install idle handler when needed
+ guint sig_id = g_signal_lookup("event", GTK_TYPE_WIDGET);
+ g_signal_add_emission_hook(sig_id, 0, event_emission_hook, NULL, NULL);
+}
+
static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
{
if (!wxTheApp)
static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
{
if (!wxTheApp)
gdk_threads_leave();
if (!moreIdles)
gdk_threads_leave();
if (!moreIdles)
- {
- // add emission hook for "event" signal, to re-install idle handler when needed
- guint sig_id = g_signal_lookup("event", GTK_TYPE_WIDGET);
- g_signal_add_emission_hook(sig_id, 0, event_emission_hook, NULL, NULL);
- }
// Return FALSE if no more idle events are to be sent
return moreIdles;
// Return FALSE if no more idle events are to be sent
return moreIdles;
-void wxApp::RemoveIdleTag()
+void wxApp::RemoveIdleSource()
{
#if wxUSE_THREADS
wxMutexLocker lock(gs_idleTagsMutex);
#endif
{
#if wxUSE_THREADS
wxMutexLocker lock(gs_idleTagsMutex);
#endif
- g_source_remove( wxTheApp->m_idleTag );
- wxTheApp->m_idleTag = 0;
+ g_source_remove(m_idleTag);
+ m_idleTag = 0;
{
// We need to remove idle callbacks or gtk_events_pending will
// never return false.
{
// We need to remove idle callbacks or gtk_events_pending will
// never return false.
- wxTheApp->RemoveIdleTag();
+ wxTheApp->RemoveIdleSource();
}
return gtk_events_pending();
}
return gtk_events_pending();