Lei Zhang : user32: Clamp newly created windows to the minimum window size.

Alexandre Julliard julliard at winehq.org
Thu Jul 17 06:38:58 CDT 2008


Module: wine
Branch: master
Commit: b3f4091b47e70681a9909bfccd19dee95657fabd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b3f4091b47e70681a9909bfccd19dee95657fabd

Author: Lei Zhang <thestig at google.com>
Date:   Mon Jul 14 16:51:15 2008 -0700

user32: Clamp newly created windows to the minimum window size.

---

 dlls/user32/tests/msg.c |    6 +++---
 dlls/user32/win.c       |    2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index d79b2c4..c2012d5 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -3374,7 +3374,7 @@ static void test_mdi_messages(void)
                                 0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
                                 mdi_client, 0, GetModuleHandleA(0), NULL);
     assert(mdi_child2);
-    ok_sequence(WmCreateMDIchildInvisibleMaxSeq4, "Create maximized invisible MDI child window", TRUE);
+    ok_sequence(WmCreateMDIchildInvisibleMaxSeq4, "Create maximized invisible MDI child window", FALSE);
     ok(IsZoomed(mdi_child2), "MDI child should be maximized\n");
     ok(!(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE), "MDI child should be not visible\n");
     ok(!IsWindowVisible(mdi_child2), "MDI child should be not visible\n");
@@ -4577,10 +4577,10 @@ static void test_setwindowpos(void)
                            NULL, NULL, 0);
 
     GetWindowRect(hwnd, &rc);
-    todo_wine expect(sysX, rc.right);
+    expect(sysX, rc.right);
     expect(winY, rc.bottom);
     GetClientRect(hwnd, &rc);
-    todo_wine expect(sysX - 6, rc.right);
+    expect(sysX - 6, rc.right);
     expect(winY - 25, rc.bottom);
 
     flush_events();
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 9a97a3a..2b7f620 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1165,6 +1165,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
         WINPOS_GetMinMaxInfo( hwnd, &maxSize, &maxPos, &minTrack, &maxTrack);
         if (maxTrack.x < cx) cx = maxTrack.x;
         if (maxTrack.y < cy) cy = maxTrack.y;
+        if (minTrack.x > cx) cx = minTrack.x;
+        if (minTrack.y > cy) cy = minTrack.y;
     }
 
     if (cx < 0) cx = 0;




More information about the wine-cvs mailing list