From 319fa1c31ec4238427b9bbc1f97c15fc5e92d9f2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 4 May 2004 04:18:29 +0000 Subject: [PATCH] Some more tests for focus behavior when hiding/showing windows. --- dlls/user/tests/win.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c index 427a24f855..e4fec209d2 100644 --- a/dlls/user/tests/win.c +++ b/dlls/user/tests/win.c @@ -1305,6 +1305,17 @@ static void test_SetFocus(HWND hwnd) SetFocus(child); ok( GetFocus() == child, "Failed to set focus to invisible child %p\n", child ); ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); + ShowWindow(child, SW_SHOW); + ok( GetWindowLong(child,GWL_STYLE) & WS_VISIBLE, "Child %p is not visible\n", child ); + ok( GetFocus() == child, "Focus no longer on child %p\n", child ); + ShowWindow(child, SW_HIDE); + ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); + ok( GetFocus() == hwnd, "Focus should be on parent %p, not %p\n", hwnd, GetFocus() ); + ShowWindow(child, SW_SHOW); + SetFocus(child); + ok( GetFocus() == child, "Focus should be on child %p\n", child ); + SetWindowPos(child,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_HIDEWINDOW); + ok( GetFocus() == child, "Focus should still be on child %p\n", child ); DestroyWindow( child ); } -- 2.32.0.93.g670b81a890