diff --git a/components/opengl/glcocoanscontext.pas b/components/opengl/glcocoanscontext.pas index 1a8803b505..a7a4778dc4 100644 --- a/components/opengl/glcocoanscontext.pas +++ b/components/opengl/glcocoanscontext.pas @@ -195,7 +195,7 @@ begin Result:=0; p := nil; if (AParams.WndParent <> 0) then - p := CocoaUtils.GetNSObjectView(NSObject(AParams.WndParent)); + p := NSObject(AParams.WndParent).lclContentView; if Assigned(p) then LCLToNSRect(types.Bounds(AParams.X, AParams.Y, AParams.Width, AParams.Height), p.frame.size.height, ns)