X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..1aca9fcdfc51f165210a9976f28afb192bfb252f:/src/gtk/timer.cpp diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index 628ede1a18..8f9fd46dc0 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/timer.cpp +// Name: src/gtk/timer.cpp // Purpose: wxTimer implementation // Author: Robert Roebling // Id: $Id$ @@ -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;