diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 93c6039e7fd..dcfe1036266 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -5190,15 +5190,6 @@ static void test_fullscreen(void) /* Windows makes a maximized window slightly larger (to hide the borders?) */ fixup = min(abs(rc.left), abs(rc.top)); InflateRect(&rc, -fixup, -fixup); - /* FIXME: this doesn't work correctly in Wine for child windows yet */ - if (style & WS_CHILD) - todo_wine - ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && - rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, - "%#x/%#x: window rect %d,%d-%d,%d must be in %d,%d-%d,%d\n", - ex_style, style, rc.left, rc.top, rc.right, rc.bottom, - mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom); - else ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, "%#x/%#x: window rect %d,%d-%d,%d must be in %d,%d-%d,%d\n", diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index f758514841d..b9f7b1a35d3 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -658,6 +658,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, HMONITOR monitor; INT xinc, yinc; LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + LONG adjustedStyle; LONG exstyle = GetWindowLongW( hwnd, GWL_EXSTYLE ); RECT rc; WND *win; @@ -671,10 +672,12 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, if (style & WS_CHILD) { if ((style & WS_CAPTION) == WS_CAPTION) - style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ + adjustedStyle = style & ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ + else + adjustedStyle = style; GetClientRect(GetAncestor(hwnd,GA_PARENT), &rc); - AdjustWindowRectEx(&rc, style, ((style & WS_POPUP) && GetMenu(hwnd)), exstyle); + AdjustWindowRectEx(&rc, adjustedStyle, ((style & WS_POPUP) && GetMenu(hwnd)), exstyle); MinMax.ptMaxSize.x = rc.right - rc.left; MinMax.ptMaxSize.y = rc.bottom - rc.top;