io/input: discard pointer reset event if filter doesn't match

New handlers receive reset events the first time Source.Event is called.
However, in case the filter doesn't match a reset event it shouldn't be
reported.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-11-27 19:33:16 -06:00
parent 1fc646a8c2
commit f5aa745038
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ func (q *Router) Event(filters ...event.Filter) (event.Event, bool) {
break
}
h := q.stateFor(f.Target)
if reset, ok := h.pointer.ResetEvent(); ok {
if reset, ok := h.pointer.ResetEvent(); ok && h.filter.pointer.Matches(reset) {
return reset, true
}
}