mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 05:56:16 +02:00
carbon intf: UpdateLCLClientRect: check if something changed
git-svn-id: trunk@27782 -
This commit is contained in:
parent
f67dde1d74
commit
e3573e3e88
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user