Merge branch 'develop' into fixes_520_toplevels_not_cleanedup

This commit is contained in:
Charlie Kindel
2022-11-05 09:45:31 -06:00
2 changed files with 10 additions and 25 deletions

View File

@@ -240,7 +240,13 @@ namespace Terminal.Gui {
);
}
/// <inheritdoc/>
/// <remarks>Also ensures that cursor is invisible after entering the <see cref="GraphView"/>.</remarks>
public override bool OnEnter (View view)
{
Driver.SetCursorVisibility (CursorVisibility.Invisible);
return base.OnEnter (view);
}
/// <inheritdoc/>
public override bool ProcessKey (KeyEvent keyEvent)

View File

@@ -466,31 +466,10 @@ namespace Terminal.Gui {
Width = Dim.Fill ();
}
/// <summary>
/// Positions the cursor at the start of the currently selected tab
/// </summary>
public override void PositionCursor ()
public override bool OnEnter (View view)
{
base.PositionCursor ();
var selected = host.CalculateViewport (Bounds).FirstOrDefault (t => Equals (host.SelectedTab, t.Tab));
if (selected == null) {
return;
}
int y;
if (host.Style.TabsOnBottom) {
y = 1;
} else {
y = host.Style.ShowTopLine ? 1 : 0;
}
Move (selected.X, y);
Driver.SetCursorVisibility (CursorVisibility.Invisible);
return base.OnEnter (view);
}
public override void Redraw (Rect bounds)