win32: mark client rect as required update before WM_SIZE passing, remove DoAdjustClientRectChange - they are called inside WM_SIZE handler after the client rect is updated (fixes bug #0021724)

git-svn-id: trunk@36804 -
This commit is contained in:
paul 2012-04-16 03:35:02 +00:00
parent c4a8916438
commit 49fc5776c9

View File

@ -2334,19 +2334,7 @@ begin
' OldClientSize='+dbgs(lWinControl.CachedClientWidth)+','+dbgs(lWinControl.CachedClientHeight)+
' NewClientSize='+dbgs(R.Right)+','+dbgs(R.Bottom));
{$ENDIF}
if (lWinControl.Width <> Width) or
(lWinControl.Height <> Height) or
lWinControl.ClientRectNeedsInterfaceUpdate then
lWinControl.DoAdjustClientRectChange
else
// If we get form size message then we probably changed it state
// (minimized/maximized -> normal). Form adjust its clientrect in the
// second WM_SIZE but WM_MOVE also updates clientrect without adjustment
// thus we need to call DoAdjustClientRectChange. It is safe since this
// methods checks whether it need to adjust something really.
if (lWinControl is TCustomForm) and (lWinControl.Parent = nil) and
(WParam = Size_Restored) then
lWinControl.DoAdjustClientRectChange(False);
lWinControl.InvalidateClientRectCache(false);
end;
OverlayWindow := GetWin32WindowInfo(Window)^.Overlay;
if OverlayWindow <> 0 then