Cocoa: TCocoaWidgetSet.IsWindow should return true for any widget handle and not just TCocoaWindowContent.

This commit is contained in:
David Jenkins 2024-11-07 16:47:38 +00:00 committed by rich2014
parent 759b07932a
commit 0fac0c3e01

View File

@ -1526,7 +1526,9 @@ begin
Result := Assigned(cbi);
if not Result then Exit;
Result:= NSObject(handle).isKindOfClass(TCocoaWindowContent);
obj := cbi.GetCallbackObject;
Result := (obj is TLCLCommonCallback)
and (HWND(TLCLCommonCallback(obj).HandleFrame)=handle);
end
else
Result := False;