X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..1c405bb51093fc7812fb66e7d47faac5707e02b5:/src/gtk/timer.cpp diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index f8531ba81c..a8514f8cd1 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -26,7 +26,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) -static gint timeout_callback( gpointer data ) +extern "C" gint timeout_callback( gpointer data ) { wxTimer *timer = (wxTimer*)data; @@ -61,6 +61,9 @@ bool wxTimer::Start( int millisecs, bool oneShot ) { (void)wxTimerBase::Start(millisecs, oneShot); + if (m_tag != -1) + gtk_timeout_remove( m_tag ); + m_tag = gtk_timeout_add( m_milli, timeout_callback, this ); return TRUE;