The window created in the separate thread in test_Input_mouse sometimes fails to catch the mouse input in time. Waiting and flushing the initial messages seems to make the issue harder to reproduce.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
Notes: This is hard to reproduce even without the patch, and it seems to only happen on the w1064v1809_ar VM for some reason.
These runs where started with the original test_Input_mouse code: https://testbot.winehq.org/JobDetails.pl?Key=59109 (3 failures) https://testbot.winehq.org/JobDetails.pl?Key=59110 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59111 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59112 (3 failures) https://testbot.winehq.org/JobDetails.pl?Key=59127 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59128 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59129 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59130 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59131 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59132 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59145 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59146 (3 failures) https://testbot.winehq.org/JobDetails.pl?Key=59147 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59148 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59149 (3 failures)
These runs with the patched version: https://testbot.winehq.org/JobDetails.pl?Key=59113 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59114 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59115 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59116 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59121 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59122 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59123 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59124 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59125 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59126 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59140 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59141 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59142 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59143 (0 failures) https://testbot.winehq.org/JobDetails.pl?Key=59144 (0 failures)
dlls/user32/tests/input.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 1e6be311eeb..d0e76038115 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -2196,6 +2196,7 @@ static DWORD WINAPI create_static_win(void *arg) { struct thread_data *thread_data = arg; HWND win; + MSG msg;
win = CreateWindowA("static", "static", WS_VISIBLE | WS_POPUP, 100, 100, 100, 100, 0, NULL, NULL, NULL); @@ -2204,6 +2205,7 @@ static DWORD WINAPI create_static_win(void *arg) GWLP_WNDPROC, (LONG_PTR)static_hook_proc); thread_data->win = win;
+ while (wait_for_message(&msg)) DispatchMessageA(&msg); SetEvent(thread_data->start_event); wait_for_event(thread_data->end_event, 5000); return 0; -- 2.24.0.rc2