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.
This commit is contained in:
NF Stevens 1999-01-30 15:49:51 +00:00 committed by Alexandre Julliard
parent a6af1f76a8
commit 114899a9de
1 changed files with 5 additions and 6 deletions

View File

@ -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)