From a1d54447b8290e8e7c666a14bc6c23d481e2b716 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 21 May 2015 11:51:50 +0100 Subject: [PATCH] comctl32/tests: Skip the hover tests if the listview's parent is not the foreground window. --- dlls/comctl32/tests/listview.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index a1651005400..3edb25a88bf 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -5178,10 +5178,18 @@ static void test_LVS_EX_HEADERINALLVIEWS(void) static void test_hover(void) { - HWND hwnd; + HWND hwnd, fg; DWORD r; hwnd = create_listview_control(LVS_ICON); + SetForegroundWindow(hwndparent); + fg = GetForegroundWindow(); + if (fg != hwndparent) + { + skip("Window is not in the foreground. Skipping hover tests.\n"); + DestroyWindow(hwnd); + return; + } /* test WM_MOUSEHOVER forwarding */ flush_sequences(sequences, NUM_MSG_SEQUENCES);