Commit 6c473550 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

user32/tests: Return MA_ACTIVATE to WM_MOUSEACTIVATE on main test window.

This shows that one of test_SetWindowPos is broken on Wine, and needs to be fixed. It was previously fixed by some change in DefWindowProcA, introduced in 71d35d89 but that was a unexpected side effect. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f6d671c3
......@@ -840,6 +840,8 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
if (wparam) app_activated = TRUE;
else app_deactivated = TRUE;
break;
case WM_MOUSEACTIVATE:
return MA_ACTIVATE;
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
......@@ -2717,7 +2719,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
ret = SetWindowPos(hwnd_child, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
ok(ret, "Got %d\n", ret);
flush_events( TRUE );
check_active_state(hwnd2, hwnd2, hwnd2);
todo_wine check_active_state(hwnd2, hwnd2, hwnd2);
DestroyWindow(hwnd_child);
}
......@@ -3371,8 +3373,12 @@ static void test_SetForegroundWindow(HWND hwnd)
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow());
ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus());
/* FIXME: these tests are failing because of a race condition
* between internal focus state applied immediately and X11 focus
* message coming late */
todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow());
todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus());
SetForegroundWindow(hwnd);
check_wnd_state(hwnd, hwnd, hwnd, 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