Huw Davies : user32/tests: Try to fix the test failures on Win 2k.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 16 10:13:14 CDT 2015


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Jun 16 12:38:53 2015 +0100

user32/tests: Try to fix the test failures on Win 2k.

---

 dlls/user32/tests/msg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index b5f9e6a..cc74f1c 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10339,13 +10339,14 @@ static void wait_move_event(HWND hwnd, int x, int y)
 {
     MSG msg;
     DWORD time;
-    BOOL ret, go = FALSE;
+    BOOL ret;
 
     time = GetTickCount();
-    while (GetTickCount() - time < 200 && !go) {
+    while (GetTickCount() - time < 200) {
 	ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE);
-	go  = ret && msg.pt.x > x && msg.pt.y > y;
+        if (ret && msg.pt.x > x && msg.pt.y > y) break;
         if (!ret) MsgWaitForMultipleObjects( 0, NULL, FALSE, GetTickCount() - time, QS_ALLINPUT );
+        else Sleep( GetTickCount() - time );
     }
 }
 




More information about the wine-cvs mailing list