From fb9e5ca9022e9b698f64afcccf482490e749725e Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 12 Jul 2019 12:24:31 +0200 Subject: [PATCH] ui/pointer: ignore hits to dropped handlers Signed-off-by: Elias Naur --- ui/input/pointer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/input/pointer.go b/ui/input/pointer.go index 70da98fd..15b05e30 100644 --- a/ui/input/pointer.go +++ b/ui/input/pointer.go @@ -129,7 +129,10 @@ func (q *pointerQueue) opHit(handlers *[]Key, pos f32.Point) { idx = n.next } if n.key != nil { - *handlers = append(*handlers, n.key) + if _, exists := q.handlers[n.key]; exists { + *handlers = append(*handlers, n.key) + } + } } }