diff --git a/event.go b/event.go index ad55ecf..fd3fbd2 100644 --- a/event.go +++ b/event.go @@ -339,11 +339,13 @@ func (window *window) handleMotionNotify ( } underneath := window.boxUnder(image.Pt(x, y), eventCategoryMouse) - window.hover(underneath) - - if !handled { - underneath.handleMouseMove() + if underneath != nil { + window.hover(underneath) + if !handled { + underneath.handleMouseMove() + } } + } func (window *window) compressExpose (