Don't crash when user hovers over nothing

This commit is contained in:
Sasha Koshka 2024-05-07 20:14:46 -04:00
parent 6a2dc36140
commit c409bc1a1e

View File

@ -339,11 +339,13 @@ func (window *window) handleMotionNotify (
} }
underneath := window.boxUnder(image.Pt(x, y), eventCategoryMouse) underneath := window.boxUnder(image.Pt(x, y), eventCategoryMouse)
window.hover(underneath) if underneath != nil {
window.hover(underneath)
if !handled { if !handled {
underneath.handleMouseMove() underneath.handleMouseMove()
}
} }
} }
func (window *window) compressExpose ( func (window *window) compressExpose (