Commit 9099b984 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 71d35d89
......@@ -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;
......
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