From 5b8c5021fe81c9af6c63e4bf56b86b9deb650935 Mon Sep 17 00:00:00 2001 From: Tig Date: Wed, 18 Sep 2024 12:29:06 -0600 Subject: [PATCH] More Toplevel cleanup --- Terminal.Gui/Application/Application.Run.cs | 5 ++--- Terminal.Gui/Views/Toplevel.cs | 17 ----------------- UnitTests/Views/ToplevelTests.cs | 3 --- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/Terminal.Gui/Application/Application.Run.cs b/Terminal.Gui/Application/Application.Run.cs index 0cc756193..4a1d89541 100644 --- a/Terminal.Gui/Application/Application.Run.cs +++ b/Terminal.Gui/Application/Application.Run.cs @@ -173,11 +173,10 @@ public static partial class Application // Run (Begin, Run, End, Stop) } /// - /// Calls on the most focused view in the view starting with . + /// Calls on the most focused view. /// /// - /// Does nothing if is or if the most focused view is not visible or - /// enabled. + /// Does nothing if there is no most focused view. /// /// If the most focused view is not visible within it's superview, the cursor will be hidden. /// diff --git a/Terminal.Gui/Views/Toplevel.cs b/Terminal.Gui/Views/Toplevel.cs index 40d2c0bcf..6fe793141 100644 --- a/Terminal.Gui/Views/Toplevel.cs +++ b/Terminal.Gui/Views/Toplevel.cs @@ -369,23 +369,6 @@ public partial class Toplevel : View return false; } - // TODO: v2 - Not sure this is needed anymore. - internal void PositionToplevels () - { - return; - - - PositionToplevel (this); - - foreach (View top in Subviews) - { - if (top is Toplevel) - { - PositionToplevel ((Toplevel)top); - } - } - } - #endregion } diff --git a/UnitTests/Views/ToplevelTests.cs b/UnitTests/Views/ToplevelTests.cs index 65f8d9505..844450abd 100644 --- a/UnitTests/Views/ToplevelTests.cs +++ b/UnitTests/Views/ToplevelTests.cs @@ -214,9 +214,6 @@ public partial class ToplevelTests (ITestOutputHelper output) Assert.Equal (9, ny); // 9+15+1(mb)=25 Assert.NotNull (sb); - top.PositionToplevels (); - //Assert.Equal (new (0, 1, 60, 15), win.Frame); - //Assert.Null (Toplevel._dragPosition); win.NewMouseEvent (new () { Position = new (6, 0), Flags = MouseFlags.Button1Pressed });