ecore-wl2: Finish send ecore events for any wayland touch related events

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-23 11:51:30 -04:00
parent 68b36dfde3
commit 6d3e8a8558
1 changed files with 16 additions and 3 deletions

View File

@ -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