Commit 9f32d6d6 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

user32: Prevent resize of minimized windows from SetWindowPos.

parent f35dabad
......@@ -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))
{
......
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