user32: Clamp newly created windows to the minimum window size.
This commit is contained in:
parent
ffd66dc6ab
commit
b3f4091b47
|
@ -3374,7 +3374,7 @@ static void test_mdi_messages(void)
|
||||||
0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
|
0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
mdi_client, 0, GetModuleHandleA(0), NULL);
|
mdi_client, 0, GetModuleHandleA(0), NULL);
|
||||||
assert(mdi_child2);
|
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(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(!(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");
|
ok(!IsWindowVisible(mdi_child2), "MDI child should be not visible\n");
|
||||||
|
@ -4577,10 +4577,10 @@ static void test_setwindowpos(void)
|
||||||
NULL, NULL, 0);
|
NULL, NULL, 0);
|
||||||
|
|
||||||
GetWindowRect(hwnd, &rc);
|
GetWindowRect(hwnd, &rc);
|
||||||
todo_wine expect(sysX, rc.right);
|
expect(sysX, rc.right);
|
||||||
expect(winY, rc.bottom);
|
expect(winY, rc.bottom);
|
||||||
GetClientRect(hwnd, &rc);
|
GetClientRect(hwnd, &rc);
|
||||||
todo_wine expect(sysX - 6, rc.right);
|
expect(sysX - 6, rc.right);
|
||||||
expect(winY - 25, rc.bottom);
|
expect(winY - 25, rc.bottom);
|
||||||
|
|
||||||
flush_events();
|
flush_events();
|
||||||
|
|
|
@ -1165,6 +1165,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
|
||||||
WINPOS_GetMinMaxInfo( hwnd, &maxSize, &maxPos, &minTrack, &maxTrack);
|
WINPOS_GetMinMaxInfo( hwnd, &maxSize, &maxPos, &minTrack, &maxTrack);
|
||||||
if (maxTrack.x < cx) cx = maxTrack.x;
|
if (maxTrack.x < cx) cx = maxTrack.x;
|
||||||
if (maxTrack.y < cy) cy = maxTrack.y;
|
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;
|
if (cx < 0) cx = 0;
|
||||||
|
|
Loading…
Reference in New Issue