Commit 3dcff4de authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

comctl32/tests: Prevent some test failures by moving the cursor away from the window.

parent 1f75b081
......@@ -3315,6 +3315,9 @@ static void test_change_focus(void)
HWND hwnd, parent_wnd;
WNDPROC oldproc;
MSG msg;
POINT orig_pos;
GetCursorPos(&orig_pos);
parent_wnd = CreateWindowA("ParentWnd", "", WS_OVERLAPPEDWINDOW,
0, 0, 200, 200, NULL, NULL, GetModuleHandleA(NULL), NULL);
......@@ -3329,6 +3332,8 @@ static void test_change_focus(void)
oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)edit_subclass_proc);
SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc);
SetCursorPos(400, 400);
SetFocus(parent_wnd);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
SetFocus(hwnd);
......@@ -3340,6 +3345,8 @@ static void test_change_focus(void)
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_combined_seq, "Kill focus", TRUE);
SetCursorPos(orig_pos.x, orig_pos.y);
DestroyWindow(hwnd);
}
......
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