}
TRACE_INPUT_END();
}
+
+ e_comp_wl_touch_frame_send_ec_set(ec);
}
static void
if (!e_comp_wl_input_touch_check(res)) continue;
wl_touch_send_motion(res, timestamp, idx, x, y);
}
+
+ e_comp_wl_touch_frame_send_ec_set(ec);
+}
+
+static void
+_e_comp_wl_send_touch_frame(E_Client *ec)
+{
+ Eina_List *l;
+ struct wl_client *wc;
+ struct wl_resource *res;
+
+ if (!ec) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ if (_e_comp_wl_check_block_input(ec)) return;
+
+ struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+ if (!surface) return;
+
+ wc = wl_resource_get_client(surface);
+
+ EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
+ {
+ if (wl_resource_get_client(res) != wc) continue;
+ if (!e_comp_wl_input_touch_check(res)) continue;
+ wl_touch_send_frame(res);
+ }
+
+ e_comp_wl_touch_frame_send_ec_set(NULL);
}
static void
}
}
+static Eina_Bool
+_e_comp_wl_cb_touch_frame(void *data, int type, void *event)
+{
+ E_Client *ec = e_comp_wl_touch_frame_send_ec_get();
+ _e_comp_wl_send_touch_frame(ec);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
static void
_e_comp_wl_client_priority_adjust(int pid, int set, int adj, Eina_Bool use_adj, Eina_Bool adj_child, Eina_Bool do_child)
{
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN, _e_comp_wl_cb_client_rot_change_begin, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL, _e_comp_wl_cb_client_rot_change_cancel, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ROTATION_CHANGE_END, _e_comp_wl_cb_client_rot_change_end, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_INPUT_TOUCH_FRAME, _e_comp_wl_cb_touch_frame, NULL);
/* add hooks to catch e_client events */
E_LIST_HOOK_APPEND(hooks, E_CLIENT_HOOK_FOCUS_SET, _e_comp_wl_client_cb_focus_set, NULL);
return EINA_TRUE;
}
+EINTERN E_Client*
+e_comp_wl_touch_frame_send_ec_get(void)
+{
+ return e_comp_wl->touch.frame_ec;
+}
+
+EINTERN void
+e_comp_wl_touch_frame_send_ec_set(E_Client *ec)
+{
+ e_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)
unsigned int num_devices;
unsigned int pressed;
E_Client *faked_ec;
+ E_Client *frame_ec;
} touch;
struct
EINTERN Eina_Bool e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, void *dev, uint32_t time);
EINTERN Eina_Bool e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time);
+EINTERN E_Client* e_comp_wl_touch_frame_send_ec_get(void);
+EINTERN void e_comp_wl_touch_frame_send_ec_set(E_Client *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);
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);
EINTERN Eina_Bool e_comp_wl_touch_cancel_send(E_Client *ec);
EINTERN int E_INPUT_EVENT_SEAT_ADD = -1;
EINTERN int E_EVENT_INPUT_ENABLED = -1;
EINTERN int E_EVENT_INPUT_DISABLED = -1;
+EINTERN int E_EVENT_INPUT_TOUCH_FRAME = -1;
+
E_API E_Input *e_input = NULL;
E_INPUT_EVENT_SEAT_ADD = ecore_event_type_new();
E_EVENT_INPUT_ENABLED = ecore_event_type_new();
E_EVENT_INPUT_DISABLED = ecore_event_type_new();
+ E_EVENT_INPUT_TOUCH_FRAME = ecore_event_type_new();
ecore_event_add(E_EVENT_INPUT_ENABLED, NULL, NULL, NULL);
E_INPUT_EVENT_SEAT_ADD = -1;
E_EVENT_INPUT_ENABLED = -1;
E_EVENT_INPUT_DISABLED = -1;
+ E_EVENT_INPUT_TOUCH_FRAME = -1;
EINA_LIST_FREE(e_input->handlers, h)
ecore_event_handler_del(h);