Merge to pattern check

Actually makes the concurrency problem SLIGHTLY better, but not much
This commit is contained in:
Brandon Thetford
2024-02-21 00:26:40 -07:00
parent 2642b0f042
commit 987f7d6454

View File

@@ -566,31 +566,26 @@ public partial class View
Rectangle startFrame = start.Frame;
if (start.InternalSubviews is { })
if (start.InternalSubviews is { Count: > 0 })
{
int count = start.InternalSubviews.Count;
Point boundsOffset = start.GetBoundsOffset ();
int rx = x - (startFrame.X + boundsOffset.X);
int ry = y - (startFrame.Y + boundsOffset.Y);
if (count > 0)
for (int i = start.InternalSubviews.Count - 1; i >= 0; i--)
{
Point boundsOffset = start.GetBoundsOffset ();
int rx = x - (startFrame.X + boundsOffset.X);
int ry = y - (startFrame.Y + boundsOffset.Y);
View v = start.InternalSubviews [i];
for (int i = count - 1; i >= 0; i--)
if (v.Visible && v.Frame.Contains (rx, ry))
{
View v = start.InternalSubviews [i];
View? deep = FindDeepestView (v, rx, ry, out resultX, out resultY);
if (v.Visible && v.Frame.Contains (rx, ry))
if (deep is null)
{
View? deep = FindDeepestView (v, rx, ry, out resultX, out resultY);
if (deep is null)
{
return v;
}
return deep;
return v;
}
return deep;
}
}
}