user32: Prevent resize of minimized windows from SetWindowPos.

This commit is contained in:
Dylan Smith 2010-07-20 17:53:23 -04:00 committed by Alexandre Julliard
parent f35dabad99
commit 9f32d6d6a9
2 changed files with 11 additions and 3 deletions

View File

@ -4923,7 +4923,7 @@ static void test_ShowWindow(void)
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "not expected ret: %lu\n", ret);
GetWindowRect(hwnd, &rc);
todo_wine ok(EqualRect(&rc, &rcMinimized), "rects should match\n");
ok(EqualRect(&rc, &rcMinimized), "rects should match\n");
ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);

View File

@ -1519,8 +1519,16 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS* pWinpos, RECT* pNewWindowRect, RECT
if (!(pWinpos->flags & SWP_NOSIZE))
{
pNewWindowRect->right = pNewWindowRect->left + pWinpos->cx;
pNewWindowRect->bottom = pNewWindowRect->top + pWinpos->cy;
if (wndPtr->dwStyle & WS_MINIMIZE)
{
pNewWindowRect->right = pNewWindowRect->left + GetSystemMetrics(SM_CXICON);
pNewWindowRect->bottom = pNewWindowRect->top + GetSystemMetrics(SM_CYICON);
}
else
{
pNewWindowRect->right = pNewWindowRect->left + pWinpos->cx;
pNewWindowRect->bottom = pNewWindowRect->top + pWinpos->cy;
}
}
if (!(pWinpos->flags & SWP_NOMOVE))
{