user32: Prevent resize of minimized windows from SetWindowPos.
This commit is contained in:
parent
f35dabad99
commit
9f32d6d6a9
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue