diff --git a/lcl/interfaces/cocoa/cocoawscommon.pas b/lcl/interfaces/cocoa/cocoawscommon.pas index f91ce37814..88a9e9a3b2 100644 --- a/lcl/interfaces/cocoa/cocoawscommon.pas +++ b/lcl/interfaces/cocoa/cocoawscommon.pas @@ -807,11 +807,11 @@ begin NewBounds.Top, Move_SourceIsInterface); end; -if not FBoundsReportedToChildren then // first time we need this to update non cocoa based client rects - begin - Target.InvalidateClientRectCache(true); - FBoundsReportedToChildren:=true; - end; + if not FBoundsReportedToChildren then // first time we need this to update non cocoa based client rects + begin + Target.InvalidateClientRectCache(true); + FBoundsReportedToChildren:=true; + end; end; diff --git a/lcl/interfaces/cocoa/cocoawsforms.pp b/lcl/interfaces/cocoa/cocoawsforms.pp index 53b5088c24..6d67d2f612 100644 --- a/lcl/interfaces/cocoa/cocoawsforms.pp +++ b/lcl/interfaces/cocoa/cocoawsforms.pp @@ -554,11 +554,11 @@ class procedure TCocoaWSCustomForm.SetBounds(const AWinControl: TWinControl; const ALeft, ATop, AWidth, AHeight: Integer); begin if AWinControl.HandleAllocated then - begin - //debugln('TCocoaWSCustomForm.SetBounds: '+AWinControl.Name+'Bounds='+dbgs(Bounds(ALeft, ATop, AWidth, AHeight))); - NSObject(AWinControl.Handle).lclSetFrame(Bounds(ALeft, ATop, AWidth, AHeight)); - TCocoaWindowContent(AwinControl.Handle).callback.boundsDidChange; - end; + begin + //debugln('TCocoaWSCustomForm.SetBounds: '+AWinControl.Name+'Bounds='+dbgs(Bounds(ALeft, ATop, AWidth, AHeight))); + NSObject(AWinControl.Handle).lclSetFrame(Bounds(ALeft, ATop, AWidth, AHeight)); + TCocoaWindowContent(AwinControl.Handle).callback.boundsDidChange; + end; end; end.