2 Commits

Author SHA1 Message Date
05f3ebc9e5 Remedy #1 2024-05-17 23:19:03 -04:00
996d747d45 Remedy #4 2024-05-17 15:36:49 -04:00
2 changed files with 10 additions and 7 deletions

View File

@@ -329,6 +329,8 @@ func (this *containerBox) recursiveRedo () {
}
func (this *containerBox) boxUnder (point image.Point, category eventCategory) anyBox {
if !point.In(this.bounds) { return nil }
if !this.capture[category] {
for _, box := range this.children {
candidate := box.(anyBox).boxUnder(point, category)
@@ -336,7 +338,7 @@ func (this *containerBox) boxUnder (point image.Point, category eventCategory) a
}
}
return this.box.boxUnder(point, category)
return this
}
func (this *containerBox) propagate (callback func (anyBox) bool) bool {

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