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 {
|
for _, child := range window.drags {
|
||||||
if child == nil { continue }
|
if child == nil { continue }
|
||||||
child.handleMouseMove()
|
child.handleMouseMove()
|
||||||
window.hover(child)
|
|
||||||
handled = true
|
handled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
underneath := window.boxUnder(image.Pt(x, y))
|
||||||
|
window.hover(underneath)
|
||||||
|
|
||||||
if !handled {
|
if !handled {
|
||||||
underneath := window.boxUnder(image.Pt(x, y))
|
|
||||||
underneath.handleMouseMove()
|
underneath.handleMouseMove()
|
||||||
window.hover(underneath)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,13 +119,9 @@ func (window *window) focus (box anyBox) {
|
|||||||
window.focused = box
|
window.focused = box
|
||||||
|
|
||||||
if previous != nil {
|
if previous != nil {
|
||||||
// FIXME why are we invalidating draw here
|
|
||||||
window.invalidateDraw(previous)
|
|
||||||
previous.handleFocusLeave()
|
previous.handleFocusLeave()
|
||||||
}
|
}
|
||||||
if box != nil && box.canBeFocused() {
|
if box != nil && box.canBeFocused() {
|
||||||
// FIXME why are we invalidating draw here
|
|
||||||
window.invalidateDraw(box)
|
|
||||||
box.handleFocusEnter()
|
box.handleFocusEnter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user