Commit 7257b62b authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

user32: Try to activate topmost activable window in WINPOS_ActivateOtherWindow.

parent c318cda8
......@@ -3766,6 +3766,11 @@ static void test_SetParent(void)
ok(bret, "SetForegroundWindow() failed\n");
check_active_state(popup, popup, popup);
ShowWindow(parent, SW_SHOW);
SetActiveWindow(popup);
ok(DestroyWindow(popup), "DestroyWindow() failed\n");
check_active_state(parent, parent, parent);
ok(DestroyWindow(parent), "DestroyWindow() failed\n");
ok(!IsWindow(parent), "parent still exists\n");
......
......@@ -1536,7 +1536,19 @@ void WINPOS_ActivateOtherWindow(HWND hwnd)
for (;;)
{
if (!(hwndTo = GetWindow( hwndTo, GW_HWNDNEXT ))) break;
if (can_activate_window( hwndTo )) break;
if (can_activate_window( hwndTo )) goto done;
}
hwndTo = GetTopWindow( 0 );
for (;;)
{
if (hwndTo == hwnd)
{
hwndTo = 0;
break;
}
if (can_activate_window( hwndTo )) goto done;
if (!(hwndTo = GetWindow( hwndTo, GW_HWNDNEXT ))) break;
}
done:
......
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