Reorderd timer code as per bug 757060. The code there
is required to set the id to -1. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,9 +30,17 @@ extern "C" gint timeout_callback( gpointer data )
|
|||||||
{
|
{
|
||||||
wxTimer *timer = (wxTimer*)data;
|
wxTimer *timer = (wxTimer*)data;
|
||||||
|
|
||||||
/* when getting called from GDK's timer handler we
|
// Don't change the order of anything in this callback!
|
||||||
are no longer within GDK's grab on the GUI
|
|
||||||
thread so we must lock it here ourselves */
|
if ( timer->IsOneShot() )
|
||||||
|
{
|
||||||
|
// This sets m_tag to -1
|
||||||
|
timer->Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// when getting called from GDK's timer handler we
|
||||||
|
// are no longer within GDK's grab on the GUI
|
||||||
|
// thread so we must lock it here ourselves
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
timer->Notify();
|
timer->Notify();
|
||||||
@@ -40,7 +48,7 @@ extern "C" gint timeout_callback( gpointer data )
|
|||||||
/* release lock again */
|
/* release lock again */
|
||||||
gdk_threads_leave();
|
gdk_threads_leave();
|
||||||
|
|
||||||
if ( timer->IsOneShot() )
|
if (timer->IsOneShot())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -30,9 +30,17 @@ extern "C" gint timeout_callback( gpointer data )
|
|||||||
{
|
{
|
||||||
wxTimer *timer = (wxTimer*)data;
|
wxTimer *timer = (wxTimer*)data;
|
||||||
|
|
||||||
/* when getting called from GDK's timer handler we
|
// Don't change the order of anything in this callback!
|
||||||
are no longer within GDK's grab on the GUI
|
|
||||||
thread so we must lock it here ourselves */
|
if ( timer->IsOneShot() )
|
||||||
|
{
|
||||||
|
// This sets m_tag to -1
|
||||||
|
timer->Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// when getting called from GDK's timer handler we
|
||||||
|
// are no longer within GDK's grab on the GUI
|
||||||
|
// thread so we must lock it here ourselves
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
timer->Notify();
|
timer->Notify();
|
||||||
@@ -40,7 +48,7 @@ extern "C" gint timeout_callback( gpointer data )
|
|||||||
/* release lock again */
|
/* release lock again */
|
||||||
gdk_threads_leave();
|
gdk_threads_leave();
|
||||||
|
|
||||||
if ( timer->IsOneShot() )
|
if (timer->IsOneShot())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Reference in New Issue
Block a user