From 05f3ebc9e5122146c4b4f4dea55f1dba3b79161c Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 17 May 2024 23:19:03 -0400 Subject: [PATCH] Remedy #1 --- event.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/event.go b/event.go index fd3fbd2..3085958 100644 --- a/event.go +++ b/event.go @@ -161,16 +161,17 @@ func (window *window) handleConfigureNotify ( if window.root == nil { return } configureEvent := *event.ConfigureNotifyEvent + configureEvent = window.compressConfigureNotify(configureEvent) - newWidth := int(configureEvent.Width) - newHeight := int(configureEvent.Height) - sizeChanged := - window.metrics.bounds.Dx() != newWidth || - window.metrics.bounds.Dy() != newHeight + oldBounds := window.metrics.bounds window.updateBounds() + newBounds := window.metrics.bounds + + sizeChanged := + oldBounds.Dx() != newBounds.Dx() || + oldBounds.Dy() != newBounds.Dy() if sizeChanged { - configureEvent = window.compressConfigureNotify(configureEvent) window.reallocateCanvas() // TODO figure out what to do with this