io/router: add ScrollGesture

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-03-30 18:12:07 +02:00
parent b2d10c2f28
commit 6389b1a384
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -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
+1
View File
@@ -85,6 +85,7 @@ type SemanticGestures int
const (
ClickGesture SemanticGestures = 1 << iota
ScrollGesture
)
// SemanticID uniquely identifies a SemanticDescription.