From ec30be606f510e7ec7ddbd794a94d7697ff4895e Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 15 Mar 2023 21:48:38 +0000 Subject: [PATCH] Fixes #2418. SetToplevelsSize is wrongly forcing toplevels resizing to console size. --- Terminal.Gui/Core/Application.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Terminal.Gui/Core/Application.cs b/Terminal.Gui/Core/Application.cs index 1785d41c6..181fd2756 100644 --- a/Terminal.Gui/Core/Application.cs +++ b/Terminal.Gui/Core/Application.cs @@ -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) {