fixed redraw on mouse position change

This commit is contained in:
Timon Ringwald 2022-04-04 14:23:17 +02:00
parent 24c4d68b0c
commit 8be528e57a

View File

@ -84,8 +84,10 @@ func (s *Screen) onMouseClicked(event *MouseEvent) {
if s.MouseClicked == nil || !s.MouseClicked(event) { if s.MouseClicked == nil || !s.MouseClicked(event) {
s.Root.OnMouseClicked(event) s.Root.OnMouseClicked(event)
} }
if event.Button != MouseButtonNone {
s.Redraw() s.Redraw()
} }
}
func convertMouseEvent(original *tcell.EventMouse) *MouseEvent { func convertMouseEvent(original *tcell.EventMouse) *MouseEvent {
x, y := original.Position() x, y := original.Position()