Module: wine Branch: master Commit: 58ae3a7fcc62b962576701d79433cc502ddedb03 URL: http://source.winehq.org/git/wine.git/?a=commit;h=58ae3a7fcc62b962576701d794...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu May 26 13:06:43 2011 -0500
user32/tests: Add test showing hotkeys change the async key state.
---
dlls/user32/tests/msg.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index da7e3d9..12e606e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13076,6 +13076,7 @@ static void test_hotkey(void) HWND test_window, taskbar_window; BOOL ret; MSG msg; + SHORT key_state;
SetLastError(0xdeadbeef); ret = UnregisterHotKey(NULL, 0); @@ -13176,6 +13177,9 @@ static void test_hotkey(void) } ok_sequence(WmHotkeyPress, "window hotkey press", FALSE);
+ key_state = GetAsyncKeyState(hotkey_letter); + ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); + keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE))