This should prevent spurious failures on Windows. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dinput8/tests/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 007f81688cc..9ec9d147dd1 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -4267,6 +4267,7 @@ static void test_simple_joystick(void) hwnd = CreateWindowW( L"static", L"dinput", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, NULL, NULL ); + SetForegroundWindow( hwnd ); hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE ); ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr ); -- 2.33.1