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 } if window.root == nil { return }
configureEvent := *event.ConfigureNotifyEvent configureEvent := *event.ConfigureNotifyEvent
configureEvent = window.compressConfigureNotify(configureEvent)
newWidth := int(configureEvent.Width) oldBounds := window.metrics.bounds
newHeight := int(configureEvent.Height)
sizeChanged :=
window.metrics.bounds.Dx() != newWidth ||
window.metrics.bounds.Dy() != newHeight
window.updateBounds() window.updateBounds()
newBounds := window.metrics.bounds
sizeChanged :=
oldBounds.Dx() != newBounds.Dx() ||
oldBounds.Dy() != newBounds.Dy()
if sizeChanged { if sizeChanged {
configureEvent = window.compressConfigureNotify(configureEvent)
window.reallocateCanvas() window.reallocateCanvas()
// TODO figure out what to do with this // TODO figure out what to do with this