io/router: don't clear event queue before cancel events

There may be unrelated events in the queue, so it's not appropriate
to clear the queue just because an input Cancel event occurs.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-07 18:20:18 +02:00
parent d86f96503f
commit d280d438c7
3 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ func (q *pointerQueue) collectHandlers(r *ops.Reader, events *handlerEvents, t o
if !ok {
h = new(pointerHandler)
q.handlers[op.Tag] = h
events.Set(op.Tag, []event.Event{pointer.Event{Type: pointer.Cancel}})
events.Add(op.Tag, pointer.Event{Type: pointer.Cancel})
}
h.active = true
h.area = area