carbon intf: UpdateLCLClientRect: check if something changed

git-svn-id: trunk@27782 -
This commit is contained in:
mattias 2010-10-21 08:47:54 +00:00
parent f67dde1d74
commit e3573e3e88
2 changed files with 15 additions and 3 deletions

View File

@ -6681,7 +6681,7 @@ var
var
s: String;
begin
s:='TWinControl.WMSize loop detected: '+DbgSName(Self)+' BoundsRealized='+dbgs(FBoundsRealized)+' NewBoundsRealized='+dbgs(NewBoundsRealized);
s:='TWinControl.WMSize loop detected, the widgetset does not like the LCL bounds or sends unneeded wmsize messages: '+DbgSName(Self)+' BoundsRealized='+dbgs(FBoundsRealized)+' NewBoundsRealized='+dbgs(NewBoundsRealized);
if (OldClientSize.cx<>NewClientSize.cx)
or (OldClientSize.cy<>NewClientSize.cy)
then

View File

@ -461,11 +461,23 @@ end;
procedure TCarbonWidget.UpdateLCLClientRect;
var
R: TRect;
ClientR: TRect;
LCLR: TRect;
LCLClientR: TRect;
RChanged: Boolean;
ClientChanged: Boolean;
begin
if not Resizing then begin
GetBounds(R);
LCLObject.InvalidateClientRectCache(False);
LCLSendSizeMsg(LCLObject, R.Right - R.Left, R.Bottom - R.Top, Size_SourceIsInterface);
GetClientRect(ClientR);
LCLR:=LCLObject.BoundsRect;
LCLClientR:=LCLObject.ClientRect;
RChanged:=not CompareRect(@R,@LCLR);
ClientChanged:=not CompareRect(@ClientR,@LCLClientR);
if not ClientChanged then
LCLObject.InvalidateClientRectCache(False);
if RChanged or ClientChanged then
LCLSendSizeMsg(LCLObject, R.Right - R.Left, R.Bottom - R.Top, Size_SourceIsInterface);
end;
end;