Fixes #2418. SetToplevelsSize is wrongly forcing toplevels resizing to console size.

This commit is contained in:
BDisp
2023-03-15 21:48:38 +00:00
committed by Tig
parent ecba204576
commit ec30be606f

View File

@@ -1547,7 +1547,6 @@ namespace Terminal.Gui {
static void TerminalResized ()
{
var full = new Rect (0, 0, Driver.Cols, Driver.Rows);
SetToplevelsSize (full);
Resized?.Invoke (new ResizedEventArgs () { Cols = full.Width, Rows = full.Height });
Driver.Clip = full;
foreach (var t in toplevels) {
@@ -1559,23 +1558,6 @@ namespace Terminal.Gui {
Refresh ();
}
static void SetToplevelsSize (Rect full)
{
if (MdiTop == null) {
foreach (var t in toplevels) {
if (t?.SuperView == null && !t.Modal) {
t.Frame = full;
t.Width = full.Width;
t.Height = full.Height;
}
}
} else {
Top.Frame = full;
Top.Width = full.Width;
Top.Height = full.Height;
}
}
static bool SetCurrentAsTop ()
{
if (MdiTop == null && Current != Top && Current?.SuperView == null && Current?.Modal == false) {