From 630b1287bff7fbc7046b8cdba609de242478ef0e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 8 Jul 2008 15:51:37 -0700 Subject: [PATCH 2/2] user32: Set WM_NOSIZE for windows smaller than SM_CXMINTRACK/SM_CYMINTRACK. --- dlls/user32/tests/msg.c | 4 +--- dlls/user32/winpos.c | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 071fd67..5219510 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -4569,9 +4569,7 @@ static void test_messages(void) res = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 100, 100, 0); ok(res == TRUE, "SetWindowPos expected TRUE, got %ld\n", res); num = sequence_contains(WM_SIZE); - todo_wine { - ok(num == 1, "expected 1 WM_SIZE in message sequence, got %d\n", num); - } + ok(num == 1, "expected 1 WM_SIZE in message sequence, got %d\n", num); DestroyWindow(hwnd); flush_sequence(); } diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index acfd481..4fd68ee 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1513,6 +1513,13 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS* pWinpos, RECT* pNewWindowRect, RECT { WND *wndPtr; + if (pWinpos->cx < GetSystemMetrics(SM_CXMINTRACK) + || pWinpos->cy < GetSystemMetrics(SM_CYMINTRACK)) + { + /* FIXME for other values of flags as well? */ + if (pWinpos->flags == 0) pWinpos->flags = SWP_NOSIZE; + } + /* Send WM_WINDOWPOSCHANGING message */ if (!(pWinpos->flags & SWP_NOSENDCHANGING)) -- 1.5.4.5