MacInspectView HitTestHarder(NSView root, CGPoint point) { var view = root.HitTest(point); if (view != null) { return(new MacInspectView(view)); } foreach (var sub in root.TraverseTree(v => v.Subviews)) { var layer = sub?.Layer?.HitTest(point); if (layer != null) { return(new MacInspectView(sub, layer, visitedLayers: null)); } } return(null); }