input: Add notify_touch_cancel()
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 6 Nov 2015 21:56:09 +0000 (15:56 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Tue, 8 Dec 2015 19:04:46 +0000 (13:04 -0600)
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 <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
src/compositor.h
src/input.c

index 43db92e..8a5aa91 100644 (file)
@@ -1159,6 +1159,9 @@ 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);
 void
index 097c8e7..f5bb54e 100644 (file)
@@ -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)