mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes Windows Terminal initial resize on CursesDriver related with #1768.
This commit is contained in:
@@ -125,9 +125,7 @@ namespace Terminal.Gui {
|
||||
private void ProcessWinChange ()
|
||||
{
|
||||
if (Curses.CheckWinChange ()) {
|
||||
Clip = new Rect (0, 0, Cols, Rows);
|
||||
Console.Out.Write ("\x1b[3J");
|
||||
Console.Out.Flush ();
|
||||
ResizeScreen ();
|
||||
UpdateOffScreen ();
|
||||
TerminalResized?.Invoke ();
|
||||
}
|
||||
@@ -871,6 +869,9 @@ namespace Terminal.Gui {
|
||||
if (reportableMouseEvents.HasFlag (Curses.Event.ReportMousePosition))
|
||||
StartReportingMouseMoves ();
|
||||
|
||||
ResizeScreen ();
|
||||
UpdateOffScreen ();
|
||||
|
||||
//HLine = Curses.ACS_HLINE;
|
||||
//VLine = Curses.ACS_VLINE;
|
||||
//Stipple = Curses.ACS_CKBOARD;
|
||||
@@ -893,8 +894,7 @@ namespace Terminal.Gui {
|
||||
Colors.Dialog = new ColorScheme ();
|
||||
Colors.Menu = new ColorScheme ();
|
||||
Colors.Error = new ColorScheme ();
|
||||
Clip = new Rect (0, 0, Cols, Rows);
|
||||
UpdateOffScreen ();
|
||||
|
||||
if (Curses.HasColors) {
|
||||
Curses.StartColor ();
|
||||
Curses.UseDefaultColors ();
|
||||
@@ -962,6 +962,13 @@ namespace Terminal.Gui {
|
||||
}
|
||||
}
|
||||
|
||||
void ResizeScreen ()
|
||||
{
|
||||
Clip = new Rect (0, 0, Cols, Rows);
|
||||
Console.Out.Write ("\x1b[3J");
|
||||
Console.Out.Flush ();
|
||||
}
|
||||
|
||||
public override void UpdateOffScreen ()
|
||||
{
|
||||
contents = new int [Rows, Cols, 3];
|
||||
|
||||
Reference in New Issue
Block a user