mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:39: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;
|
Result := nil;
|
||||||
if CocoaWidgetSet.CaptureControl = 0 then Exit;
|
if CocoaWidgetSet.CaptureControl = 0 then Exit;
|
||||||
obj := NSObject(CocoaWidgetSet.CaptureControl);
|
obj := NSObject(CocoaWidgetSet.CaptureControl);
|
||||||
lCaptureView := GetNSObjectView(obj);
|
lCaptureView := obj.lclContentView;
|
||||||
if (obj <> Owner) and (lCaptureView <> Owner) and not FIsEventRouting then
|
if (obj <> Owner) and (lCaptureView <> Owner) and not FIsEventRouting then
|
||||||
begin
|
begin
|
||||||
Result := lCaptureView.lclGetCallback;
|
Result := lCaptureView.lclGetCallback;
|
||||||
@ -1088,7 +1088,7 @@ begin
|
|||||||
if not targetControl.HandleAllocated then Exit; // Fixes crash due to events being sent after ReleaseHandle
|
if not targetControl.HandleAllocated then Exit; // Fixes crash due to events being sent after ReleaseHandle
|
||||||
FIsEventRouting:=true;
|
FIsEventRouting:=true;
|
||||||
//debugln(Target.name+' -> '+targetControl.Name+'- is parent:'+dbgs(targetControl=Target.Parent)+' Point: '+dbgs(br)+' Rect'+dbgs(rect));
|
//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;
|
if obj = nil then Exit;
|
||||||
callback := obj.lclGetCallback;
|
callback := obj.lclGetCallback;
|
||||||
if callback = nil then Exit; // Avoids crashes
|
if callback = nil then Exit; // Avoids crashes
|
||||||
|
Loading…
Reference in New Issue
Block a user