diff --git a/Terminal.Gui/Application/ApplicationNavigation.cs b/Terminal.Gui/Application/ApplicationNavigation.cs index 20965adbf..088629140 100644 --- a/Terminal.Gui/Application/ApplicationNavigation.cs +++ b/Terminal.Gui/Application/ApplicationNavigation.cs @@ -83,8 +83,6 @@ public class ApplicationNavigation return; } - //Debug.Assert(value is {}); - _focused = value; FocusedChanged?.Invoke (null, EventArgs.Empty); diff --git a/Terminal.Gui/View/Adornment/Border.cs b/Terminal.Gui/View/Adornment/Border.cs index 838760417..37e7bb39f 100644 --- a/Terminal.Gui/View/Adornment/Border.cs +++ b/Terminal.Gui/View/Adornment/Border.cs @@ -289,7 +289,7 @@ public class Border : Adornment // BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/3312 if (!_dragPosition.HasValue && mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed)) { - Parent.SetFocus (); + Parent!.SetFocus (); ApplicationOverlapped.BringOverlappedTopToFront (); if (!Parent!.Arrangement.HasFlag (ViewArrangement.Movable) @@ -451,7 +451,7 @@ public class Border : Adornment { if (_dragPosition.HasValue) { - if (Parent.SuperView is null) + if (Parent!.SuperView is null) { // Redraw the entire app window. Application.Top!.SetNeedsDisplay (); diff --git a/Terminal.Gui/View/View.Navigation.cs b/Terminal.Gui/View/View.Navigation.cs index b851dd52d..e1b652cbb 100644 --- a/Terminal.Gui/View/View.Navigation.cs +++ b/Terminal.Gui/View/View.Navigation.cs @@ -589,7 +589,6 @@ public partial class View // Focus and cross-view navigation management (TabStop { if (superViewOrParent?._previouslyFocused is { }) { - Debug.Assert (!superViewOrParent._previouslyFocused.WasDisposed); if (superViewOrParent._previouslyFocused != this) { superViewOrParent?._previouslyFocused?.SetFocus ();