From 03fbf37fe82a3283d100957918b5162e74fd84a9 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 6 Jun 2011 11:02:41 -0500 Subject: [PATCH] user32/tests: Ignore paint messages in hotkey tests. --- dlls/user32/tests/msg.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 303c629e822..da7e3d98b72 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13024,7 +13024,6 @@ static const struct message WmHotkeyPressLWIN[] = { { WM_KEYDOWN, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 1 }, { WM_KEYDOWN, sent|wparam|lparam, VK_LWIN, 1 }, - { WM_PAINT, sent|optional }, { 0 } }; static const struct message WmHotkeyPress[] = { @@ -13159,12 +13158,14 @@ static void test_hotkey(void) /* Inject the appropriate key sequence */ keybd_event(VK_LWIN, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) DispatchMessage(&msg); ok_sequence(WmHotkeyPressLWIN, "window hotkey press LWIN", FALSE); keybd_event(hotkey_letter, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) { if (msg.message == WM_HOTKEY) { @@ -13176,12 +13177,14 @@ static void test_hotkey(void) ok_sequence(WmHotkeyPress, "window hotkey press", FALSE); keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) DispatchMessage(&msg); ok_sequence(WmHotkeyRelease, "window hotkey release", FALSE); keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) DispatchMessage(&msg); ok_sequence(WmHotkeyReleaseLWIN, "window hotkey release LWIN", FALSE); @@ -13205,7 +13208,8 @@ static void test_hotkey(void) /* Inject the appropriate key sequence */ keybd_event(VK_LWIN, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) { ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); DispatchMessage(&msg); @@ -13213,7 +13217,8 @@ static void test_hotkey(void) ok_sequence(WmHotkeyPressLWIN, "thread hotkey press LWIN", FALSE); keybd_event(hotkey_letter, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) { if (msg.message == WM_HOTKEY) { @@ -13234,7 +13239,8 @@ static void test_hotkey(void) ok_sequence(WmHotkeyPress, "thread hotkey press", FALSE); keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) { ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); DispatchMessage(&msg); @@ -13242,7 +13248,8 @@ static void test_hotkey(void) ok_sequence(WmHotkeyRelease, "thread hotkey release", FALSE); keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, TRUE)) + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || + PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) { ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); DispatchMessage(&msg);