ecore-wl2: Finish up touch support. Record touch motion coordinates
authorChris Michael <cp.michael@samsung.com>
Thu, 24 Sep 2015 14:29:43 +0000 (10:29 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
into input->pointer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/ecore_wl2_input.c

index 4a802a5..bec665d 100644 (file)
@@ -899,6 +899,9 @@ _touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial
    if (!input) return;
    if (!input->focus.touch) return;
 
+   input->timestamp = timestamp;
+   input->display->serial = serial;
+
    _ecore_wl2_input_mouse_up_send(input, input->focus.touch, id,
                                   BTN_LEFT, timestamp);
 
@@ -915,6 +918,10 @@ _touch_cb_motion(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int ti
    if (!input) return;
    if (!input->focus.touch) return;
 
+   input->timestamp = timestamp;
+   input->pointer.sx = wl_fixed_to_int(x);
+   input->pointer.sy = wl_fixed_to_int(y);
+
    _ecore_wl2_input_mouse_move_send(input, input->focus.touch, id);
 }