From 6389b1a384a4d970e5ae6e92af730f751af34ab4 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 30 Mar 2022 18:12:07 +0200 Subject: [PATCH] io/router: add ScrollGesture Signed-off-by: Elias Naur --- io/router/pointer.go | 3 +++ io/router/router.go | 1 + 2 files changed, 4 insertions(+) diff --git a/io/router/pointer.go b/io/router/pointer.go index dd8c7ec6..a6f45b12 100644 --- a/io/router/pointer.go +++ b/io/router/pointer.go @@ -265,6 +265,9 @@ func (c *pointerCollector) inputOp(op pointer.InputOp, events *handlerEvents) { if op.Types&(pointer.Press|pointer.Release) != 0 { area.semantic.content.gestures |= ClickGesture } + if op.Types&pointer.Scroll != 0 { + area.semantic.content.gestures |= ScrollGesture + } area.semantic.valid = area.semantic.content.gestures != 0 h := c.newHandler(op.Tag, events) h.wantsGrab = h.wantsGrab || op.Grab diff --git a/io/router/router.go b/io/router/router.go index 089c6f12..f7fb059e 100644 --- a/io/router/router.go +++ b/io/router/router.go @@ -85,6 +85,7 @@ type SemanticGestures int const ( ClickGesture SemanticGestures = 1 << iota + ScrollGesture ) // SemanticID uniquely identifies a SemanticDescription.