Dmitry Timoshkov : user32: Flush painting events harder in some places in order to avoid races in the message tests .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 30 05:22:18 CST 2006


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Sat Oct 28 17:42:56 2006 +0900

user32: Flush painting events harder in some places in order to avoid races in the message tests.

---

 dlls/user/tests/msg.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/user/tests/msg.c b/dlls/user/tests/msg.c
index 9eaa5f0..14a7bdd 100644
--- a/dlls/user/tests/msg.c
+++ b/dlls/user/tests/msg.c
@@ -3816,6 +3816,7 @@ static void test_messages(void)
     ok (hchild != 0, "Failed to create child window\n");
 
     SetFocus(hchild);
+    flush_events();
     flush_sequence();
 
     EnableWindow(hparent, FALSE);
@@ -3830,8 +3831,6 @@ static void test_messages(void)
     /* MsgWaitForMultipleObjects test */
     ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
     ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret);
-    msg.message = 0xdeadbeef;
-    ok(!PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "got not expected %04x\n", msg.message);
 
     PostMessageA(hparent, WM_USER, 0, 0);
 
@@ -6712,6 +6711,8 @@ static void test_scrollwindowex(void)
     flush_sequence();
     while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
     ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0);
+    flush_events();
+    flush_sequence();
 
     /* Now without the SW_ERASE flag */
     trace("start scroll\n");
@@ -6721,6 +6722,8 @@ static void test_scrollwindowex(void)
     flush_sequence();
     while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
     ok_sequence(ScrollWindowPaint2, "ScrollWindowEx", 0);
+    flush_events();
+    flush_sequence();
 
     /* now scroll the child window as well */
     trace("start scroll\n");
@@ -6734,6 +6737,8 @@ static void test_scrollwindowex(void)
     flush_sequence();
     while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
     ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0);
+    flush_events();
+    flush_sequence();
 
     /* now scroll with ScrollWindow() */
     trace("start scroll with ScrollWindow\n");




More information about the wine-cvs mailing list