From: Filip Navara Date: Sun, 27 Feb 2005 14:55:01 +0000 (+0000) Subject: Use unadjusted rect (the one calculated before sending WM_SIZING) for sizing calculat... X-Git-Tag: backups/alex_devel_branch@15093~21^2~9 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=2229c3b1f4c3e80e45ea1f728ad65e89f3d319f3;hp=2f494319c3b240b702713a760949a6fd81510dc0 Use unadjusted rect (the one calculated before sending WM_SIZING) for sizing calculations while resizing windows. svn path=/trunk/; revision=13764 --- diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index 00cec8d6701..b478cf5b2f8 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -418,7 +418,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) { HRGN DesktopRgn; MSG msg; - RECT sizingRect, mouseRect, origRect, clipRect; + RECT sizingRect, mouseRect, origRect, clipRect, unmodRect; HDC hdc; LONG hittest = (LONG)(wParam & 0x0f); HCURSOR hDragCursor = 0, hOldCursor = 0; @@ -487,6 +487,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) WinPosGetMinMaxInfo(hwnd, NULL, NULL, &minTrack, &maxTrack); GetWindowRect(hwnd, &sizingRect); + GetWindowRect(hwnd, &unmodRect); if (Style & WS_CHILD) { MapWindowPoints( 0, hWndParent, (LPPOINT)&sizingRect, 2 ); @@ -623,7 +624,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) if (msg.message == WM_KEYDOWN) SetCursorPos( pt.x, pt.y ); else { - RECT newRect = sizingRect; + RECT newRect = unmodRect; WPARAM wpSizingHit = 0; if (hittest == HTCAPTION) OffsetRect( &newRect, dx, dy ); @@ -637,6 +638,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) /* determine the hit location */ if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT) wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT); + unmodRect = newRect; SendMessageA( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect ); if (!iconic)