user32: Fixed minimal size of child windows.
Florian Köberle
florian at fkoeberle.de
Fri Sep 26 06:24:49 CDT 2008
---
dlls/user32/tests/win.c | 8 ++++----
dlls/user32/winpos.c | 8 ++++++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 5234794..acaa346 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -4922,10 +4922,10 @@ static void test_minimal_child_window_size(HWND parentWindow) {
width = rect.right - rect.left;
height = rect.bottom - rect.top;
- todo_wine
- ok( width == expectedSize && height == expectedSize,
- "The minimal size of the child window should be %dx%d, but the window got enlarged to %dx%d.\n",
- expectedSize, expectedSize, width, height);
+
+ ok( width == expectedSize && height == expectedSize,
+ "The minimal size of the child window should be %dx%d, but the window got enlarged to %dx%d.\n",
+ expectedSize, expectedSize, width, height);
SetLastError(0xdeadbeef);
success = DestroyWindow(childWindow);
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index cbe844a..7899d92 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -658,6 +658,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
LONG exstyle = GetWindowLongA( hwnd, GWL_EXSTYLE );
RECT rc;
WND *win;
+ UINT border;
/* Compute default values */
@@ -678,14 +679,17 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
MinMax.ptMaxSize.x = rc.right - rc.left;
MinMax.ptMaxSize.y = rc.bottom - rc.top;
+ SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 );
+ MinMax.ptMinTrackSize.x = 4 + 2*border;
+ MinMax.ptMinTrackSize.y = 4 + 2*border;
}
else
{
MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN);
+ MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
+ MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
}
- MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
- MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXMAXTRACK);
MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYMAXTRACK);
--
1.5.4.3
--------------010001030505090509060703--
More information about the wine-patches
mailing list