Jacek Caban : mshtml: Better timer handling.

Alexandre Julliard julliard at winehq.org
Fri Jun 20 06:21:56 CDT 2008


Module: wine
Branch: master
Commit: 723b745579dba79e693e190ac624f0dabd344cb5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=723b745579dba79e693e190ac624f0dabd344cb5

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jun 19 16:09:58 2008 -0500

mshtml: Better timer handling.

---

 dlls/mshtml/task.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c
index 55ca882..f9969c5 100644
--- a/dlls/mshtml/task.c
+++ b/dlls/mshtml/task.c
@@ -81,7 +81,6 @@ static void release_task_timer(HWND thread_hwnd, task_timer_t *timer)
 {
     list_remove(&timer->entry);
 
-    KillTimer(thread_hwnd, timer->id);
     IDispatch_Release(timer->disp);
 
     heap_free(timer);
@@ -336,18 +335,25 @@ static void process_task(task_t *task)
 static LRESULT process_timer(void)
 {
     thread_data_t *thread_data = get_thread_data(TRUE);
-    DWORD tc = GetTickCount();
+    DWORD tc;
     task_timer_t *timer;
 
+    TRACE("\n");
+
     while(!list_empty(&thread_data->timer_list)) {
         timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry);
+
+        tc = GetTickCount();
         if(timer->time > tc) {
             SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time-tc, NULL);
             return 0;
         }
 
         list_remove(&timer->entry);
+        list_init(&timer->entry);
+
         call_disp_func(timer->doc, timer->disp);
+
         release_task_timer(thread_data->thread_hwnd, timer);
     }
 




More information about the wine-cvs mailing list