Remedy #1
This commit is contained in:
parent
996d747d45
commit
05f3ebc9e5
13
event.go
13
event.go
@ -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
|
||||||
|
Reference in New Issue
Block a user