From 3cc004a65051b107e34c72852c229e32d9683706 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 6 Nov 2015 15:56:09 -0600 Subject: [PATCH] input: Add notify_touch_cancel() We already have notify_touch(), notify_touch_frame(). We need notify_touch_cancel() to implement touch in the weston wayland backend properly. Reviewed-by: Daniel Stone Signed-off-by: Derek Foreman --- src/compositor.h | 3 +++ src/input.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 43db92ea..8a5aa91b 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -1158,6 +1158,9 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id, void notify_touch_frame(struct weston_seat *seat); +void +notify_touch_cancel(struct weston_seat *seat); + void weston_layer_entry_insert(struct weston_layer_entry *list, struct weston_layer_entry *entry); diff --git a/src/input.c b/src/input.c index 097c8e73..f5bb54e1 100644 --- a/src/input.c +++ b/src/input.c @@ -1807,6 +1807,15 @@ notify_touch_frame(struct weston_seat *seat) grab->interface->frame(grab); } +WL_EXPORT void +notify_touch_cancel(struct weston_seat *seat) +{ + struct weston_touch *touch = weston_seat_get_touch(seat); + struct weston_touch_grab *grab = touch->grab; + + grab->interface->cancel(grab); +} + static int pointer_cursor_surface_get_label(struct weston_surface *surface, char *buf, size_t len)