pepper: Add a touch grab func for touch point cancel
authorTaekyun Kim <tkq.kim@samsung.com>
Fri, 16 Oct 2015 10:31:37 +0000 (19:31 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Fri, 16 Oct 2015 10:31:37 +0000 (19:31 +0900)
Change-Id: I319eb6583ee713df732c89408063705cc5802e78

src/lib/pepper/pepper.h
src/lib/pepper/touch.c

index 4200cc8..7856c41 100644 (file)
@@ -427,6 +427,7 @@ struct pepper_touch_grab
     void    (*up)(pepper_touch_t *touch, void *data, uint32_t time, uint32_t id);
     void    (*motion)(pepper_touch_t *touch, void *data,
                       uint32_t time, uint32_t id, double x, double y);
+    void    (*cancel_touch_point)(pepper_touch_t *touch, uint32_t id);
     void    (*frame)(pepper_touch_t *touch, void *data);
     void    (*cancel)(pepper_touch_t *touch, void *data);
 };
index 2f9441e..100d50c 100644 (file)
@@ -34,6 +34,9 @@ touch_point_handle_focus_destroy(pepper_event_listener_t *listener, pepper_objec
 {
     pepper_touch_point_t *point = data;
     touch_point_set_focus(point, NULL);
+
+    if (point->touch->grab)
+        point->touch->grab->cancel_touch_point(point->touch, point->id, point->touch->data);
 }
 
 static void