This commit is contained in:
Sasha Koshka 2024-05-17 23:19:03 -04:00
parent 996d747d45
commit 05f3ebc9e5

View File

@ -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