Module: wine Branch: master Commit: d62ac319d2850acd81b14627476660340a32abd3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d62ac319d2850acd81b146274...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 10 14:58:57 2018 +0100
dinput/tests: Try harder to avoid spurious keyboard input.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dinput/tests/keyboard.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c index 8ee22fa..e8dfb4f 100644 --- a/dlls/dinput/tests/keyboard.c +++ b/dlls/dinput/tests/keyboard.c @@ -411,6 +411,8 @@ static void test_dik_codes(IDirectInputA *dI, HWND hwnd, LANGID langid)
if (!PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE)) { + U(in).ki.dwFlags = KEYEVENTF_KEYUP; + SendInput(1, &in, sizeof(in)); win_skip("failed to queue keyboard event\n"); break; } @@ -471,6 +473,7 @@ static void keyboard_tests(DWORD version) hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); + SetForegroundWindow( hwnd );
if (hwnd) {