From cf9c24b846c1831eb340833e5a792c1d6cce31ea Mon Sep 17 00:00:00 2001 From: BDisp Date: Tue, 16 Jan 2024 01:11:48 +0000 Subject: [PATCH] Fixes #3182. OnResizeNeeded returns int.MaxValue and int.MaxValue when Application.Top is null, should return Size.Empty. --- Terminal.Gui/View/Layout/ViewLayout.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/View/Layout/ViewLayout.cs b/Terminal.Gui/View/Layout/ViewLayout.cs index 37d9515bd..0d3378e5b 100644 --- a/Terminal.Gui/View/Layout/ViewLayout.cs +++ b/Terminal.Gui/View/Layout/ViewLayout.cs @@ -560,7 +560,7 @@ public partial class View { var relativeBounds = SuperView is { IsInitialized: true } ? SuperView.Bounds : Application.Top != null && Application.Top.IsInitialized ? Application.Top.Bounds : Application.Driver?.Bounds ?? - new Rect (0, 0, int.MaxValue, int.MaxValue); + Rect.Empty; SetRelativeLayout (relativeBounds); // TODO: Determine what, if any of the below is actually needed here.