[PATCH 11/11] user32: Fixed minTrack and size of thick child windows.
Florian Köberle
florian at fkoeberle.de
Tue Jan 20 06:52:43 CST 2009
---
dlls/user32/tests/win.c | 37 +++++++++----------------------------
dlls/user32/winpos.c | 12 ++++++++++--
2 files changed, 19 insertions(+), 30 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 8f12443..757afd4 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5270,20 +5270,12 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
}
actualMinTrackX = minmax->ptMinTrackSize.x;
actualMinTrackY = minmax->ptMinTrackSize.y;
- if (!(test_thick_child_style & (WS_DLGFRAME | WS_BORDER))) {
- todo_wine
- ok(actualMinTrackX == expectedMinTrackX && actualMinTrackY == expectedMinTrackY,
- "expected minTrack %dx%d, actual minTrack %dx%d for %s\n",
- expectedMinTrackX, expectedMinTrackY, actualMinTrackX, actualMinTrackY,
- test_thick_child_name);
- }
- else
- {
- ok(actualMinTrackX == expectedMinTrackX && actualMinTrackY == expectedMinTrackY,
- "expected minTrack %dx%d, actual minTrack %dx%d for %s\n",
- expectedMinTrackX, expectedMinTrackY, actualMinTrackX, actualMinTrackY,
- test_thick_child_name);
- }
+
+ ok(actualMinTrackX == expectedMinTrackX && actualMinTrackY == expectedMinTrackY,
+ "expected minTrack %dx%d, actual minTrack %dx%d for %s\n",
+ expectedMinTrackX, expectedMinTrackY, actualMinTrackX, actualMinTrackY,
+ test_thick_child_name);
+
actualMaxTrackX = minmax->ptMaxTrackSize.x;
actualMaxTrackY = minmax->ptMaxTrackSize.y;
@@ -5438,20 +5430,9 @@ static void test_thick_child_size(HWND parentWindow)
expectedHeight = 2 * getExpectedBorderSize(test_thick_child_style, test_thick_child_exStyle);
}
- if (!(test_thick_child_style & (WS_DLGFRAME | WS_BORDER)))
- {
- todo_wine
- ok((childWidth == expectedWidth) && (childHeight == expectedHeight),
- "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n",
- test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight);
- }
- else
- {
- ok((childWidth == expectedWidth) && (childHeight == expectedHeight),
- "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n",
- test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight);
- }
-
+ ok((childWidth == expectedWidth) && (childHeight == expectedHeight),
+ "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n",
+ test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight);
SetLastError(0xdeadbeef);
success = DestroyWindow(childWindow);
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 54d7dbe..3e49906 100755
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -681,8 +681,16 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
MinMax.ptMaxSize.x = rc.right - rc.left;
MinMax.ptMaxSize.y = rc.bottom - rc.top;
- MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
- MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
+ if (style & (WS_DLGFRAME | WS_BORDER))
+ {
+ MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
+ MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
+ }
+ else
+ {
+ MinMax.ptMinTrackSize.x = 2 * border;
+ MinMax.ptMinTrackSize.y = 2 * border;
+ }
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXMAXTRACK);
MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYMAXTRACK);
--
1.5.4.3
More information about the wine-patches
mailing list