|
@@ -161,8 +161,9 @@ namespace Terminal.Gui {
|
|
|
|
|
|
internal static bool _initialized = false;
|
|
|
|
|
|
+ static int cols, rows;
|
|
|
static IMainLoopDriver oldMainLoopDriver;
|
|
|
- static ConsoleDriver oldDriver;
|
|
|
+ static ConsoleDriver oldDriver;
|
|
|
|
|
|
/// <summary>
|
|
|
/// Initializes the Terminal.Gui application
|
|
@@ -188,7 +189,7 @@ namespace Terminal.Gui {
|
|
|
mainLoopDriver = new NetMainLoop (() => Console.ReadKey (true));
|
|
|
Driver = new NetDriver ();
|
|
|
} else if (p == PlatformID.Win32NT || p == PlatformID.Win32S || p == PlatformID.Win32Windows) {
|
|
|
- var windowsDriver = new WindowsDriver ();
|
|
|
+ var windowsDriver = cols == 0 && rows == 0 ? new WindowsDriver () : new WindowsDriver (cols, rows);
|
|
|
mainLoopDriver = windowsDriver;
|
|
|
Driver = windowsDriver;
|
|
|
} else {
|
|
@@ -556,6 +557,8 @@ namespace Terminal.Gui {
|
|
|
}
|
|
|
last?.PositionCursor ();
|
|
|
Driver.Refresh ();
|
|
|
+ cols = Driver.Cols;
|
|
|
+ rows = Driver.Rows;
|
|
|
}
|
|
|
|
|
|
internal static void End (View view, bool closeDriver = true)
|