mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 00:46:39 +01:00
Merge to pattern check
Actually makes the concurrency problem SLIGHTLY better, but not much
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user