Store thread id instead of queue handle in timer structure.
diff --git a/windows/timer.c b/windows/timer.c
index 4ba0c3c..b312e90 100644
--- a/windows/timer.c
+++ b/windows/timer.c
@@ -36,8 +36,8 @@
typedef struct tagTIMER
{
HWND hwnd;
- HQUEUE16 hq;
- UINT16 msg; /* WM_TIMER or WM_SYSTIMER */
+ DWORD thread;
+ UINT msg; /* WM_TIMER or WM_SYSTIMER */
UINT id;
UINT timeout;
HWINDOWPROC proc;
@@ -89,11 +89,11 @@
/***********************************************************************
- * TIMER_RemoveQueueTimers
+ * TIMER_RemoveThreadTimers
*
- * Remove all timers for a given queue.
+ * Remove all timers for the current thread.
*/
-void TIMER_RemoveQueueTimers( HQUEUE16 hqueue )
+void TIMER_RemoveThreadTimers(void)
{
int i;
TIMER *pTimer;
@@ -101,7 +101,7 @@
EnterCriticalSection( &csTimer );
for (i = NB_TIMERS, pTimer = TimersArray; i > 0; i--, pTimer++)
- if ((pTimer->hq == hqueue) && pTimer->timeout)
+ if ((pTimer->thread == GetCurrentThreadId()) && pTimer->timeout)
TIMER_ClearTimer( pTimer );
LeaveCriticalSection( &csTimer );
@@ -175,7 +175,7 @@
/* Add the timer */
pTimer->hwnd = hwnd;
- pTimer->hq = InitThreadInput16( 0, 0 );
+ pTimer->thread = GetCurrentThreadId();
pTimer->msg = sys ? WM_SYSTIMER : WM_TIMER;
pTimer->id = id;
pTimer->timeout = timeout;