From 375205a4d2d8c0401b237fce191fc48d117ee552 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 17 Jan 2023 14:31:06 -0500 Subject: [PATCH] Core no longer naievely constrains canvas resize dimensions --- backends/x/window.go | 4 +--- elements/core/core.go | 1 - layouts/vertical.go | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/backends/x/window.go b/backends/x/window.go index 0602007..58fa4df 100644 --- a/backends/x/window.go +++ b/backends/x/window.go @@ -207,7 +207,6 @@ func (window *Window) resizeChildToFit () { minimumHeight := child.MinimumHeightFor(window.metrics.width) minimumWidth, _ := child.MinimumSize() - icccm.WmNormalHintsSet ( window.backend.connection, window.xWindow.Id, @@ -219,7 +218,7 @@ func (window *Window) resizeChildToFit () { if window.metrics.height >= minimumHeight && window.metrics.width >= minimumWidth { - + window.child.Resize ( window.metrics.width, window.metrics.height) @@ -254,7 +253,6 @@ func (window *Window) childDrawCallback (region tomo.Canvas) { } func (window *Window) childMinimumSizeChangeCallback (width, height int) { - println("x thinks:",width, height) icccm.WmNormalHintsSet ( window.backend.connection, window.xWindow.Id, diff --git a/elements/core/core.go b/elements/core/core.go index 9b057f0..91ceac9 100644 --- a/elements/core/core.go +++ b/elements/core/core.go @@ -113,7 +113,6 @@ func (control CoreControl) PushAll () { // AllocateCanvas resizes the canvas, constraining the width and height so that // they are not less than the specified minimum width and height. func (control *CoreControl) AllocateCanvas (width, height int) { - width, height, _ = control.ConstrainSize(width, height) control.core.canvas = tomo.NewBasicCanvas(width, height) control.BasicCanvas = control.core.canvas } diff --git a/layouts/vertical.go b/layouts/vertical.go index 46614da..e3f4a50 100644 --- a/layouts/vertical.go +++ b/layouts/vertical.go @@ -99,7 +99,6 @@ func (layout Vertical) MinimumSize ( width += theme.Padding() * 2 height += theme.Padding() * 2 } - println(width, height) return }