io/router: deliver scroll events only to the foremost scroll handler

Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>
This commit is contained in:
Gordon Klaus
2020-06-03 11:09:19 +02:00
committed by Elias Naur
parent 9d2a6c48d8
commit 33a87ac61c
3 changed files with 50 additions and 0 deletions
+5
View File
@@ -267,6 +267,11 @@ func (q *pointerQueue) deliverEvent(p *pointerInfo, events *handlerEvents, e poi
e.Position = h.transform.Invert().Transform(e.Position)
addPointerEvent(events, k, e, h.types)
// Only deliver scroll events to the foremost handler.
if e.Type == pointer.Scroll && e.Type&h.types != 0 {
return
}
}
}