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 71d35d8940
but that was a
unexpected side effect.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f6d671c343
commit
6c47355006
|
@ -840,6 +840,8 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
|
||||||
if (wparam) app_activated = TRUE;
|
if (wparam) app_activated = TRUE;
|
||||||
else app_deactivated = TRUE;
|
else app_deactivated = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case WM_MOUSEACTIVATE:
|
||||||
|
return MA_ACTIVATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProcA(hwnd, msg, wparam, lparam);
|
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);
|
ret = SetWindowPos(hwnd_child, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
|
||||||
ok(ret, "Got %d\n", ret);
|
ok(ret, "Got %d\n", ret);
|
||||||
flush_events( TRUE );
|
flush_events( TRUE );
|
||||||
check_active_state(hwnd2, hwnd2, hwnd2);
|
todo_wine check_active_state(hwnd2, hwnd2, hwnd2);
|
||||||
DestroyWindow(hwnd_child);
|
DestroyWindow(hwnd_child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3371,8 +3373,12 @@ static void test_SetForegroundWindow(HWND hwnd)
|
||||||
|
|
||||||
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
|
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
|
||||||
if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
|
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);
|
SetForegroundWindow(hwnd);
|
||||||
check_wnd_state(hwnd, hwnd, hwnd, 0);
|
check_wnd_state(hwnd, hwnd, hwnd, 0);
|
||||||
|
|
Loading…
Reference in New Issue