user32: Use the windows created by the SetParent() test to get a more predictable active/focus window state.

This commit is contained in:
Dmitry Timoshkov 2011-02-18 12:31:52 +08:00 committed by Alexandre Julliard
parent 9cc0cd39a1
commit 798edfec16
1 changed files with 9 additions and 12 deletions

View File

@ -3460,9 +3460,9 @@ static void test_SetParent(void)
check_parents(child1, parent, parent, parent, 0, parent, parent); check_parents(child1, parent, parent, parent, 0, parent, parent);
check_parents(popup, desktop, 0, 0, 0, popup, popup); check_parents(popup, desktop, 0, 0, 0, popup, popup);
SetFocus(0); SetActiveWindow(parent);
SetActiveWindow(0); SetFocus(parent);
check_active_state(0, 0, 0); check_active_state(parent, 0, parent);
ret = SetParent(popup, child1); ret = SetParent(popup, child1);
ok(ret == desktop, "expected %p, got %p\n", desktop, ret); ok(ret == desktop, "expected %p, got %p\n", desktop, ret);
@ -3470,17 +3470,14 @@ static void test_SetParent(void)
todo_wine todo_wine
check_active_state(popup, 0, popup); check_active_state(popup, 0, popup);
SetFocus(0); SetActiveWindow(parent);
SetActiveWindow(0); SetFocus(parent);
/* NT4 sets active window to 0, other Windows versions check_active_state(parent, 0, parent);
* leave the popup an active window.
check_active_state(popup, 0, 0); */
todo_wine todo_wine {
ok(SetForegroundWindow(popup), "SetForegroundWindow() failed\n"); ok(SetForegroundWindow(popup), "SetForegroundWindow() failed\n");
/* NT4 sets focus window to the popup, other Windows versions check_active_state(popup, 0, popup);
* leave the focus set to 0. }
check_active_state(popup, 0, 0); */
ok(DestroyWindow(parent), "DestroyWindow() failed\n"); ok(DestroyWindow(parent), "DestroyWindow() failed\n");