[PATCH 5/6] user32: Fix maximized child windows.
Florian Köberle
florian at fkoeberle.de
Sat Jan 24 11:06:41 CST 2009
---
dlls/user32/tests/win.c | 9 ---------
dlls/user32/winpos.c | 7 +++++--
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 7f2aa91..9035080 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5186,15 +5186,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 f758514..1ace260 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;
--
1.5.4.3
More information about the wine-patches
mailing list