mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
io/router: deliver Release before Leave
Fixes a problem where a touch Release would signal gesture.Click that it had left just before click would complete. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -245,6 +245,7 @@ func (q *pointerQueue) Push(e pointer.Event, events *handlerEvents) {
|
||||
}
|
||||
|
||||
if e.Type == pointer.Release {
|
||||
q.deliverEvent(p, events, e)
|
||||
p.pressed = false
|
||||
}
|
||||
q.scratch = q.scratch[:0]
|
||||
@@ -259,9 +260,6 @@ func (q *pointerQueue) Push(e pointer.Event, events *handlerEvents) {
|
||||
}
|
||||
q.deliverEnterLeaveEvents(p, q.scratch, events, e)
|
||||
|
||||
if e.Type == pointer.Release {
|
||||
q.deliverEvent(p, events, e)
|
||||
}
|
||||
if !p.pressed {
|
||||
p.handlers = append(p.handlers[:0], q.scratch...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user