From e9e466c1345e51e212f0d48ca486a39e8ec40d84 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 27 Apr 2003 21:18:17 +0000 Subject: [PATCH] timer no longer returns IsRunning() after a one shot timer has fired. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/timer.cpp | 5 +++++ src/gtk1/timer.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index a8514f8cd1..48313ee6ad 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -41,7 +41,12 @@ extern "C" gint timeout_callback( gpointer data ) gdk_threads_leave(); if ( timer->IsOneShot() ) + { + // This sets m_tag to -1 + timer->Stop(); + return FALSE; + } return TRUE; } diff --git a/src/gtk1/timer.cpp b/src/gtk1/timer.cpp index a8514f8cd1..48313ee6ad 100644 --- a/src/gtk1/timer.cpp +++ b/src/gtk1/timer.cpp @@ -41,7 +41,12 @@ extern "C" gint timeout_callback( gpointer data ) gdk_threads_leave(); if ( timer->IsOneShot() ) + { + // This sets m_tag to -1 + timer->Stop(); + return FALSE; + } return TRUE; }