Commit 119e215e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

user32: SetWindowPos() shouldn't change the client rect of a minimized window.

parent 9fdb1fd9
......@@ -6550,6 +6550,18 @@ static void test_ShowWindow(void)
todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
/* SetWindowPos shouldn't affect the client rect */
ret = SetWindowPos(hwnd, 0, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "not expected ret: %lu\n", ret);
GetWindowRect(hwnd, &rc);
todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);
......
......@@ -1699,7 +1699,7 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS *pWinpos, RECT *old_window_rect, REC
WIN_GetRectangles( pWinpos->hwnd, COORDS_PARENT, old_window_rect, old_client_rect );
*new_window_rect = *old_window_rect;
*new_client_rect = (wndPtr->dwStyle & WS_MINIMIZE) ? *old_window_rect : *old_client_rect;
*new_client_rect = *old_client_rect;
if (!(pWinpos->flags & SWP_NOSIZE))
{
......
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