From e4cba4a7c9847a0bfb80242cc9c38b6caa402f42 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 25 Jul 2024 20:37:38 -0400 Subject: [PATCH] Add check while calculating min size to prevent goofy situations --- internal/system/hierarchy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/system/hierarchy.go b/internal/system/hierarchy.go index a1ffb24..87cf7fa 100644 --- a/internal/system/hierarchy.go +++ b/internal/system/hierarchy.go @@ -341,15 +341,21 @@ func (this *Hierarchy) drawBackgroundPart (canvas.Canvas) { // if so, windows should be transparent if the color has transparency } +// var minimumSizeCount = 0 func (this *Hierarchy) doMinimumSize () { this.minimumClean = true + // println("doMinimumSize", minimumSizeCount) + // minimumSizeCount ++ + previousMinimumSize := this.minimumSize this.minimumSize = image.Point { } if this.root != nil { this.minimumSize = this.root.minimumSize() } - this.link.NotifyMinimumSizeChange() + if previousMinimumSize != this.minimumSize { + this.link.NotifyMinimumSizeChange() + } } func (this *Hierarchy) newStyleApplicator () *styleApplicator {