X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..cd5e9298159e58f57e05f3b76c9d4a45e1eefe12:/src/gtk1/timer.cpp diff --git a/src/gtk1/timer.cpp b/src/gtk1/timer.cpp index f8531ba81c..a8514f8cd1 100644 --- a/src/gtk1/timer.cpp +++ b/src/gtk1/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;