mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
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:
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user