Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/user32/tests/win.c | 12 ++++++++++++ dlls/user32/winpos.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 50dbf49e19..ceb4b82313 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6548,6 +6548,18 @@ static void test_ShowWindow(void) 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)); + /* 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));
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 4b39d0aa39..38444b243f 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -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)) {