tests: implement touch in test-helpers
Let the client bind to wl_touch. Since we have our own seat,
we know that the compositor will have wl_touch capability.
v2: rebased due to changes in previous commit
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index bd60f28..63883fe 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -69,6 +69,7 @@
struct wl_seat *wl_seat;
struct pointer *pointer;
struct keyboard *keyboard;
+ struct touch *touch;
char *seat_name;
enum wl_seat_capability caps;
struct wl_list link;
@@ -98,6 +99,18 @@
} repeat_info;
};
+struct touch {
+ struct wl_touch *wl_touch;
+ int down_x;
+ int down_y;
+ int x;
+ int y;
+ int id;
+ int up_id; /* id of last wl_touch.up event */
+ int frame_no;
+ int cancel_no;
+};
+
struct output {
struct wl_output *wl_output;
int x;