Dmitry Timoshkov : user32: Fix most of test failures when running message test under win2k and XP.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 5 06:23:15 CST 2007


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Sat Mar  3 12:48:46 2007 +0800

user32: Fix most of test failures when running message test under win2k and XP.

---

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

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 53c076f..a380883 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -4232,7 +4232,7 @@ static const struct message WmSetFontButtonSeq[] =
 {
     { WM_SETFONT, sent },
     { WM_PAINT, sent },
-    { WM_ERASEBKGND, sent|defwinproc },
+    { WM_ERASEBKGND, sent|defwinproc|optional },
     { WM_CTLCOLORBTN, sent|defwinproc },
     { 0 }
 };
@@ -4372,7 +4372,7 @@ static const struct message WmSetFontStaticSeq[] =
 {
     { WM_SETFONT, sent },
     { WM_PAINT, sent|defwinproc },
-    { WM_ERASEBKGND, sent|defwinproc },
+    { WM_ERASEBKGND, sent|defwinproc|optional },
     { WM_CTLCOLORSTATIC, sent|defwinproc },
     { 0 }
 };
@@ -8010,7 +8010,10 @@ static void test_PeekMessage(void)
        "wrong qstatus %08x\n", qstatus);
 
     msg.message = 0;
-    ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16));
+    if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */
+        ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16));
+    else /* workaround for a missing QS_RAWINPUT support */
+        ret = PeekMessageA(&msg, 0, WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE);
     ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N',
        "got %d and %04x wParam %08x instead of TRUE and WM_KEYDOWN wParam 'N'\n",
        ret, msg.message, msg.wParam);
@@ -8021,7 +8024,10 @@ static void test_PeekMessage(void)
        "wrong qstatus %08x\n", qstatus);
 
     msg.message = 0;
-    ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16));
+    if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */
+        ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16));
+    else /* workaround for a missing QS_RAWINPUT support */
+        ret = PeekMessageA(&msg, 0, WM_KEYUP, WM_KEYUP, PM_REMOVE);
     ok(ret && msg.message == WM_KEYUP && msg.wParam == 'N',
        "got %d and %04x wParam %08x instead of TRUE and WM_KEYUP wParam 'N'\n",
        ret, msg.message, msg.wParam);




More information about the wine-cvs mailing list