Signed-off-by: Zebediah Figura z.figura12@gmail.com --- The test added by this patch requires both this and the next patch to pass under Wine. I would have reversed the order, but the next patch alone causes a failure in the window procedure.
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 f9472ec..4190c7f 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6609,6 +6609,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); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 10f0fd0..49e4e3f 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1661,7 +1661,7 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS* pWinpos, RECT* pNewWindowRect, RECT
WIN_GetRectangles( pWinpos->hwnd, COORDS_PARENT, &window_rect, &client_rect ); *pNewWindowRect = window_rect; - *pNewClientRect = (wndPtr->dwStyle & WS_MINIMIZE) ? window_rect : client_rect; + *pNewClientRect = client_rect;
if (!(pWinpos->flags & SWP_NOSIZE)) {