mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 13:19:21 +02:00
cocoa: replacing use of GetNSObjectView with lclContentView
git-svn-id: trunk@61764 -
This commit is contained in:
parent
5e4157f40b
commit
648d487f39
@ -472,7 +472,7 @@ begin
|
||||
Result := nil;
|
||||
if CocoaWidgetSet.CaptureControl = 0 then Exit;
|
||||
obj := NSObject(CocoaWidgetSet.CaptureControl);
|
||||
lCaptureView := GetNSObjectView(obj);
|
||||
lCaptureView := obj.lclContentView;
|
||||
if (obj <> Owner) and (lCaptureView <> Owner) and not FIsEventRouting then
|
||||
begin
|
||||
Result := lCaptureView.lclGetCallback;
|
||||
@ -1088,7 +1088,7 @@ begin
|
||||
if not targetControl.HandleAllocated then Exit; // Fixes crash due to events being sent after ReleaseHandle
|
||||
FIsEventRouting:=true;
|
||||
//debugln(Target.name+' -> '+targetControl.Name+'- is parent:'+dbgs(targetControl=Target.Parent)+' Point: '+dbgs(br)+' Rect'+dbgs(rect));
|
||||
obj := GetNSObjectView(NSObject(targetControl.Handle));
|
||||
obj := NSObject(targetControl.Handle).lclContentView;
|
||||
if obj = nil then Exit;
|
||||
callback := obj.lclGetCallback;
|
||||
if callback = nil then Exit; // Avoids crashes
|
||||
|
Loading…
Reference in New Issue
Block a user