summaryrefslogtreecommitdiff
path: root/src/evdev-mt-touchpad-thumb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev-mt-touchpad-thumb.c')
-rw-r--r--src/evdev-mt-touchpad-thumb.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad-thumb.c b/src/evdev-mt-touchpad-thumb.c
index 17b324e2..ceb123ef 100644
--- a/src/evdev-mt-touchpad-thumb.c
+++ b/src/evdev-mt-touchpad-thumb.c
@@ -447,3 +447,19 @@ tp_init_thumb(struct tp_dispatch *tp)
tp->thumb.use_pressure ? ", pressure" : "",
tp->thumb.use_size ? ", size" : "");
}
+
+struct tp_touch*
+tp_thumb_get_touch(struct tp_dispatch *tp)
+{
+ struct tp_touch *thumb;
+
+ if (tp->thumb.index == UINT_MAX)
+ return NULL;
+
+ tp_for_each_touch(tp, thumb) {
+ if (thumb->index == tp->thumb.index)
+ return thumb;
+ }
+
+ return NULL;
+}