Module: wine Branch: master Commit: 9099b9843f048565b8bc5b3ee084df55956c5bf4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9099b9843f048565b8bc5b3ee...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Nov 5 13:46:51 2019 +0100
user32/tests: Wait and flush messages after window creation.
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 Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 1e6be311ee..d0e7603811 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;