Forked from v2_3273_fix_finddeepestview

This commit is contained in:
Tig Kindel
2024-02-28 10:17:51 -07:00
parent 2432bf76b8
commit 91242b668a
2 changed files with 3 additions and 8 deletions

View File

@@ -1374,15 +1374,9 @@ public static partial class Application
return;
}
// TODO: In PR #3273, FindDeepestView will return adornments. Update logic below to fix adornment mouse handling
var view = View.FindDeepestView (Current, a.MouseEvent.X, a.MouseEvent.Y);
// TODO: Remove this temporary filter:
if (view is Adornment adornment)
{
view = adornment.Parent;
}
if (view is { WantContinuousButtonPressed: true })
{
WantContinuousButtonPressedView = view;

View File

@@ -550,7 +550,7 @@ public partial class View
/// <param name="start">The superview where to look for.</param>
/// <param name="x">The column location in the superview.</param>
/// <param name="y">The row location in the superview.</param>
/// <param name="findAdornments">TODO: Remove this after unit tests are fixed</param>
/// <param name="findAdornments">TODO: Remove this in PR #3273</param>
/// <returns>
/// The view that was found at the <paramref name="x"/> and <paramref name="y"/> coordinates.
/// <see langword="null"/> if no view was found.
@@ -572,6 +572,7 @@ public partial class View
if (findAdornments)
{
// TODO: This is a temporary hack for PR #3273; it is not actually used anywhere but unit tests at this point.
if (start.Margin.Thickness.Contains (start.Margin.Frame, x, y))
{
return start.Margin;