Commit 114899a9 authored by NF Stevens's avatar NF Stevens Committed by Alexandre Julliard

In Window SetWindowPos with SWP_HIDEWINDOW does not remove

the focus from the focus window; ShowWindow with SW_HIDE does. So move the code that does this from SetWindowPos to ShowWindow.
parent a6af1f76
......@@ -1121,6 +1121,11 @@ BOOL32 WINAPI ShowWindow32( HWND32 hwnd, INT32 cmd )
if (!wasVisible) return FALSE;
swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE |
SWP_NOACTIVATE | SWP_NOZORDER;
if ((hwnd == GetFocus32()) || IsChild32( hwnd, GetFocus32()))
{
/* Revert focus to parent */
SetFocus32( GetParent32(hwnd) );
}
break;
case SW_SHOWMINNOACTIVE:
......@@ -2384,12 +2389,6 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
uFlags |= SMC_NOPARENTERASE;
}
if ((winpos.hwnd == GetFocus32()) ||
IsChild32( winpos.hwnd, GetFocus32()))
{
/* Revert focus to parent */
SetFocus32( GetParent32(winpos.hwnd) );
}
if (hwnd == CARET_GetHwnd()) DestroyCaret32();
if (winpos.hwnd == hwndActive)
......
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