diff --git a/dlls/dinput/tests/mouse.c b/dlls/dinput/tests/mouse.c index 09b2b275cd5..25a9a5e85d1 100644 --- a/dlls/dinput/tests/mouse.c +++ b/dlls/dinput/tests/mouse.c @@ -73,6 +73,12 @@ static void test_acquire(LPDIRECTINPUT pDI, HWND hwnd) DIMOUSESTATE m_state; HWND hwnd2; + if (! SetForegroundWindow(hwnd)) + { + skip("Not running as foreground app, skipping acquire tests\n"); + return; + } + hr = IDirectInput_CreateDevice(pDI, &GUID_SysMouse, &pMouse, NULL); ok(SUCCEEDED(hr), "IDirectInput_CreateDevice() failed: %08x\n", hr); if (FAILED(hr)) return;