io/router: merge grab and types for multiple InputOps for same handler

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-08 14:59:59 +02:00
parent ea85e80dc8
commit 700d8d8c2c
2 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -109,8 +109,8 @@ func (q *pointerQueue) collectHandlers(r *ops.Reader, events *handlerEvents, t o
}
h.active = true
h.area = area
h.wantsGrab = op.Grab
h.types = op.Types
h.wantsGrab = h.wantsGrab || op.Grab
h.types = h.types | op.Types
}
}
}
@@ -169,6 +169,8 @@ func (q *pointerQueue) Frame(root *op.Ops, events *handlerEvents) {
for _, h := range q.handlers {
// Reset handler.
h.active = false
h.wantsGrab = false
h.types = 0
}
q.hitTree = q.hitTree[:0]
q.areas = q.areas[:0]