Behavior relating to hovering is more solid
This commit is contained in:
parent
e126c01055
commit
00629a863d
6
event.go
6
event.go
@ -315,14 +315,14 @@ func (window *window) handleMotionNotify (
|
||||
for _, child := range window.drags {
|
||||
if child == nil { continue }
|
||||
child.handleMouseMove()
|
||||
window.hover(child)
|
||||
handled = true
|
||||
}
|
||||
|
||||
underneath := window.boxUnder(image.Pt(x, y))
|
||||
window.hover(underneath)
|
||||
|
||||
if !handled {
|
||||
underneath := window.boxUnder(image.Pt(x, y))
|
||||
underneath.handleMouseMove()
|
||||
window.hover(underneath)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,13 +119,9 @@ func (window *window) focus (box anyBox) {
|
||||
window.focused = box
|
||||
|
||||
if previous != nil {
|
||||
// FIXME why are we invalidating draw here
|
||||
window.invalidateDraw(previous)
|
||||
previous.handleFocusLeave()
|
||||
}
|
||||
if box != nil && box.canBeFocused() {
|
||||
// FIXME why are we invalidating draw here
|
||||
window.invalidateDraw(box)
|
||||
box.handleFocusEnter()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user