X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..aa3e374197e99d6362468dd821935050e5074065:/src/gtk/timer.cpp?ds=sidebyside diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index 628ede1a18..86d5395f58 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -13,6 +13,7 @@ #if wxUSE_TIMER #include "wx/gtk/private/timer.h" +#include "wx/app.h" #include @@ -40,6 +41,10 @@ static gboolean timeout_callback(gpointer data) // Release lock again. gdk_threads_leave(); + wxApp* app = wxTheApp; + if (app) + app->WakeUpIdle(); + return keepGoing; } @@ -50,7 +55,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot) if ( !wxTimerImpl::Start(millisecs, oneShot) ) return false; - wxASSERT_MSG( !m_sourceId, _T("shouldn't be still running") ); + wxASSERT_MSG( !m_sourceId, wxT("shouldn't be still running") ); m_sourceId = g_timeout_add(m_milli, timeout_callback, this); @@ -59,7 +64,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot) void wxGTKTimerImpl::Stop() { - wxASSERT_MSG( m_sourceId, _T("should be running") ); + wxASSERT_MSG( m_sourceId, wxT("should be running") ); g_source_remove(m_sourceId); m_sourceId = 0;