Alexandre Julliard : user32/tests: Flush events more aggressively in mouse input test.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jul 25 07:44:17 CDT 2007


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jul 25 13:46:42 2007 +0200

user32/tests: Flush events more aggressively in mouse input test.

---

 dlls/user32/tests/win.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 6cbddeb..9c08367 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2507,7 +2507,7 @@ static void test_mouse_input(HWND hwnd)
     GetCursorPos(&pt);
     ok(x == pt.x && y == pt.y, "wrong cursor pos (%d,%d), expected (%d,%d)\n", pt.x, pt.y, x, y);
 
-    while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
+    flush_events();
 
     /* Check that setting the same position will generate WM_MOUSEMOVE */
     SetCursorPos(x, y);
@@ -2520,7 +2520,7 @@ static void test_mouse_input(HWND hwnd)
      * otherwise it won't generate relative mouse movements below.
      */
     mouse_event(MOUSEEVENTF_MOVE, -1, -1, 0, 0);
-    while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
+    flush_events();
 
     msg.message = 0;
     mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0);
@@ -2536,7 +2536,7 @@ static void test_mouse_input(HWND hwnd)
     ShowWindow(popup, SW_HIDE);
     ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "no message available\n");
     ok(msg.hwnd == hwnd && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", msg.hwnd, msg.message);
-    while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
+    flush_events();
 
     mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0);
     ShowWindow(hwnd, SW_HIDE);
@@ -2547,8 +2547,6 @@ static void test_mouse_input(HWND hwnd)
 
     ShowWindow(hwnd, SW_SHOW);
     ShowWindow(popup, SW_SHOW);
-
-    while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
     flush_events();
 
     mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
@@ -2580,7 +2578,7 @@ static void test_mouse_input(HWND hwnd)
     ok(!ret, "message %04x available\n", msg.message);
 
     ShowWindow(popup, SW_HIDE);
-    while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
+    flush_events();
 
     mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
     mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);




More information about the wine-cvs mailing list