comp_wl->touch.frame_ec = ec;
}
-EINTERN Eina_Bool
-e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
+static Eina_Bool
+_e_comp_wl_device_send_event_axis(E_Client *ec, int idx, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
{
struct wl_client *wc;
uint32_t serial;
_e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
}
+ return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
+{
+ E_Comp_Wl_Data *comp_wl;
+ comp_wl = e_comp_wl_get();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
+
+ if (!_e_comp_wl_device_send_event_axis(ec, idx, dev, radius_x, radius_y, pressure, angle, time))
+ return EINA_FALSE;
+
x = x + ec->client.x;
y = y + ec->client.y;
EINTERN Eina_Bool
e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
{
- E_Devicemgr_Input_Device *device;
- uint32_t serial;
- struct wl_client *wc;
E_Comp_Wl_Data *comp_wl;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-
comp_wl = e_comp_wl_get();
EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
- struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
- EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
-
- if (!dev) device = e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
-
- wc = wl_resource_get_client(surface);
- if (!time) time = e_util_timestamp_get();
- serial = wl_display_next_serial(comp_wl->wl.disp);
-
- if (dev)
- {
- _e_comp_wl_send_event_device(wc, time, dev, serial);
- _e_comp_wl_device_handle_axes(ecore_device_identifier_get(dev), ECORE_DEVICE_CLASS_TOUCH, ec, idx, radius_x, radius_y, pressure, angle);
- }
- else if (device)
- {
- _e_comp_wl_device_send_last_event_device(comp_wl, ec, ECORE_DEVICE_CLASS_TOUCH, time);
- _e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
- }
+ if (!_e_comp_wl_device_send_event_axis(ec, idx, dev, radius_x, radius_y, pressure, angle, time))
+ return EINA_FALSE;
x = x + ec->client.x;
y = y + ec->client.y;