# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1043094471 0 # Node ID 446dd8cea4770c008180cb7add7670094e39b550 # Parent b955228477b3c3a114d0976b4a7b888813fd4fed Removed window parameter on Windows. diff -r b955228477b3 -r 446dd8cea477 win/dw.c --- a/win/dw.c Mon Jan 20 20:21:06 2003 +0000 +++ b/win/dw.c Mon Jan 20 20:27:51 2003 +0000 @@ -2956,6 +2956,8 @@ while (GetMessage(&msg, NULL, 0, 0)) { + if(msg.hwnd == NULL && msg.message == WM_TIMER) + _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); } @@ -2976,6 +2978,8 @@ if(PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { GetMessage(&msg, NULL, 0, 0); + if(msg.hwnd == NULL && msg.message == WM_TIMER) + _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); } @@ -3041,6 +3045,8 @@ while (GetMessage(&msg,NULL,0,0)) { + if(msg.hwnd == NULL && msg.message == WM_TIMER) + _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); if(dialog->done) @@ -7389,19 +7395,17 @@ * Returns: * Timer ID for use with dw_timer_disconnect(), 0 on error. */ -int API dw_timer_connect(HWND window, int interval, void *sigfunc, void *data) -{ - static int timerid = 0; - - if(window && sigfunc) - { - timerid++; - - if(timerid < 1) - timerid = 1; - - _new_signal(WM_TIMER, window, timerid, sigfunc, data); - return SetTimer(window, timerid, interval, NULL); +int API dw_timer_connect(int interval, void *sigfunc, void *data) +{ + if(sigfunc) + { + int timerid = SetTimer(NULL, 0, interval, NULL); + + if(timerid) + { + _new_signal(WM_TIMER, NULL, timerid, sigfunc, data); + return timerid; + } } return 0; } @@ -7419,11 +7423,12 @@ if(!id) return; + KillTimer(NULL, id); + while(tmp) { if(tmp->id == id) { - KillTimer(tmp->window, id); if(prev) { prev->next = tmp->next;