Florian Köberle : user32: Fix maximized child windows.
Alexandre Julliard
julliard at winehq.org
Tue Jan 27 09:08:18 CST 2009
Module: wine
Branch: master
Commit: 8afc5fe6d5509a8f63a0c5fde8151aa7bc685dc3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8afc5fe6d5509a8f63a0c5fde8151aa7bc685dc3
Author: Florian Köberle <florian at fkoeberle.de>
Date: Sat Jan 24 18:06:41 2009 +0100
user32: Fix maximized child windows.
---
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 93c6039..dcfe103 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 f758514..b9f7b1a 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;
More information about the wine-cvs
mailing list