From 7684d7442ed592e265e9d9d3deeb49931302f6d7 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 23 Feb 2011 15:33:44 +0000 Subject: [PATCH] Increase Windows cefclient timer speed so that CefDoMessageLoopWork() is called more frequently in single-threaded message loop mode (issue #189). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@193 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tests/cefclient/cefclient_win.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/cefclient/cefclient_win.cpp b/tests/cefclient/cefclient_win.cpp index 09b6059c5..6a57e0048 100644 --- a/tests/cefclient/cefclient_win.cpp +++ b/tests/cefclient/cefclient_win.cpp @@ -368,8 +368,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) static_cast >(g_handler), "http://www.google.com"); - // Start the timer that will be used to update child window state - SetTimer(hWnd, 1, 250, NULL); + // Start the timer that will be used to update child window state. The + // timer is also necessary in single-threaded message loop mode so that + // CefDoMessageLoopWork() is called frequently enough for things like + // smooth JavaScript animation. + SetTimer(hWnd, 1, USER_TIMER_MINIMUM, NULL); } return 0;