mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 21:39:12 +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
|
var
|
||||||
s: String;
|
s: String;
|
||||||
begin
|
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)
|
if (OldClientSize.cx<>NewClientSize.cx)
|
||||||
or (OldClientSize.cy<>NewClientSize.cy)
|
or (OldClientSize.cy<>NewClientSize.cy)
|
||||||
then
|
then
|
||||||
|
@ -461,11 +461,23 @@ end;
|
|||||||
procedure TCarbonWidget.UpdateLCLClientRect;
|
procedure TCarbonWidget.UpdateLCLClientRect;
|
||||||
var
|
var
|
||||||
R: TRect;
|
R: TRect;
|
||||||
|
ClientR: TRect;
|
||||||
|
LCLR: TRect;
|
||||||
|
LCLClientR: TRect;
|
||||||
|
RChanged: Boolean;
|
||||||
|
ClientChanged: Boolean;
|
||||||
begin
|
begin
|
||||||
if not Resizing then begin
|
if not Resizing then begin
|
||||||
GetBounds(R);
|
GetBounds(R);
|
||||||
LCLObject.InvalidateClientRectCache(False);
|
GetClientRect(ClientR);
|
||||||
LCLSendSizeMsg(LCLObject, R.Right - R.Left, R.Bottom - R.Top, Size_SourceIsInterface);
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user