浏览代码

Forked from v2_3273_fix_finddeepestview

Tig Kindel 1 年之前
父节点
当前提交
91242b668a
共有 2 个文件被更改,包括 3 次插入8 次删除
  1. 1 7
      Terminal.Gui/Application.cs
  2. 2 1
      Terminal.Gui/View/Layout/ViewLayout.cs

+ 1 - 7
Terminal.Gui/Application.cs

@@ -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;

+ 2 - 1
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -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;