Commit 1cf3d8ca authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

user32: Change SetFocus behavior on windows with parent and no WS_CHILD flag.

parent b816a8e6
......@@ -277,6 +277,7 @@ HWND WINAPI SetFocus( HWND hwnd )
HWND parent;
LONG style = GetWindowLongW( hwndTop, GWL_STYLE );
if (style & (WS_MINIMIZE | WS_DISABLED)) return 0;
if (!(style & WS_CHILD)) break;
parent = GetAncestor( hwndTop, GA_PARENT );
if (!parent || parent == GetDesktopWindow())
{
......
......@@ -3724,6 +3724,25 @@ todo_wine
check_active_state(popup, 0, popup);
SetActiveWindow(parent);
SetFocus(popup);
check_active_state(popup, 0, popup);
EnableWindow(child1, FALSE);
check_active_state(popup, 0, popup);
SetFocus(parent);
check_active_state(parent, 0, parent);
SetFocus(popup);
check_active_state(popup, 0, popup);
EnableWindow(child1, TRUE);
ShowWindow(child1, SW_MINIMIZE);
SetFocus(parent);
check_active_state(parent, 0, parent);
SetFocus(popup);
check_active_state(popup, 0, popup);
ShowWindow(child1, SW_HIDE);
SetActiveWindow(parent);
SetFocus(parent);
check_active_state(parent, 0, parent);
......
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