Commit 0741d193 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

user32/tests: Flush events after test_ShowWindow().

The test minimizes windows, which triggers most window managers to generate focus events on other windows. These events aren't processed until halfway through the next test, test_EnableWindow(), when a message loop is run, and as a result an unexpected window (usually hwndMain) is activated, causing the test to fail. The testbot uses focus-follows-mouse mode, so these focus events were not triggered, thereby causing a success inside the todo block. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3b3c25e1
......@@ -6780,6 +6780,8 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
flush_events(TRUE);
}
static DWORD CALLBACK enablewindow_thread(LPVOID arg)
......@@ -6834,8 +6836,7 @@ static void test_EnableWindow(void)
}
ok(!IsWindowEnabled(hwnd), "window should not be enabled\n");
todo_wine
check_active_state(hwnd, hwnd, hwnd);
check_active_state(hwnd, hwnd, hwnd);
ok(0 == GetCapture(), "GetCapture() = %p\n", GetCapture());
CloseHandle(hthread);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment