aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-09-23 11:51:30 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:02:40 -0500
commit6d3e8a85585d3cbc4084dfbfb3bba0cd30df6144 (patch)
treee1c38cf3abc4a3f389889f4e37a642d69a4b0f6a /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: Send mouse up event when we ungrab input (diff)
downloadefl-6d3e8a85585d3cbc4084dfbfb3bba0cd30df6144.tar.gz
ecore-wl2: Finish send ecore events for any wayland touch related events
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index b8d0f0de3e..b4b1130a5f 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -650,7 +650,16 @@ _touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int seri
input->focus.touch = window;
- /* TODO: Finish sending ecore events */
+ _pointer_cb_enter(data, NULL, serial, surface, x, y);
+
+ if ((!input->grab.window) && (input->focus.touch))
+ {
+ _ecore_wl2_input_grab(input, input->focus.touch, BTN_LEFT);
+ input->grab.timestamp = timestamp;
+ }
+
+ _ecore_wl2_input_mouse_down_send(input, input->focus.touch, id,
+ BTN_LEFT, timestamp);
}
static void
@@ -662,7 +671,11 @@ _touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial
if (!input) return;
if (!input->focus.touch) return;
- /* TODO: Send ecore mouse up event and do input ungrab */
+ _ecore_wl2_input_mouse_up_send(input, input->focus.touch, id,
+ BTN_LEFT, timestamp);
+
+ if ((input->grab.window) && (input->grab.button == BTN_LEFT))
+ _ecore_wl2_input_ungrab(input);
}
static void
@@ -674,7 +687,7 @@ _touch_cb_motion(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int ti
if (!input) return;
if (!input->focus.touch) return;
- /* TODO: Send ecore mouse move event */
+ _ecore_wl2_input_mouse_move_send(input, input->focus.touch, timestamp, id);
}
static void