static void
_ecore_wl2_input_touch_axis_process(Ecore_Wl2_Input *input, int id)
{
- if (id >= ECORE_WL2_TOUCH_MAX)
+ if (id >= input->touch.max_count)
return;
if (input->touch.last_touch_axis.radius_x)
ev->multi.device = device;
// TIZEN_ONLY(20171109): support a tizen_input_device_manager interface
- if (device >= ECORE_WL2_TOUCH_MAX)
+ if (device >= input->touch.max_count)
{
ev->multi.radius = 1;
ev->multi.radius_x = 1;
}
// TIZEN_ONLY(20171109): support a tizen_input_device_manager interface
- if (device >= ECORE_WL2_TOUCH_MAX)
+ if (device >= input->touch.max_count)
{
ev->multi.radius = 1;
ev->multi.radius_x = 1;
// TIZEN_ONLY(20171109): support a tizen_input_device_manager interface
- if (device < ECORE_WL2_TOUCH_MAX)
+ if (device < input->touch.max_count)
{
input->touch.touch_axis[device].radius_x = 1.0;
input->touch.touch_axis[device].radius_y = 1.0;
;
}
+static void
+_ecore_wl2_input_device_manager_cb_max_touch_count(void *data, struct tizen_input_device_manager *tizen_input_device_manager EINA_UNUSED, uint32_t serial EINA_UNUSED, int32_t max_count, struct wl_seat *seat)
+{
+ Ecore_Wl2_Display *ewd = (Ecore_Wl2_Display *)data;
+ Ecore_Wl2_Input *input;
+
+ if (!ewd) return;
+
+ input = wl_seat_get_user_data(seat);
+
+ if (!input) return;
+
+ if (input->touch.max_count < max_count)
+ {
+ if (input->touch.touch_axis)
+ {
+ INF("Max touch value is changed %d to %d\n", input->touch.max_count, max_count);
+ free(input->touch.touch_axis);
+ }
+ input->touch.max_count = max_count;
+ input->touch.touch_axis = (Ecore_Wl2_Touch_Axis *)calloc(max_count, sizeof(Ecore_Wl2_Touch_Axis));
+ }
+}
+
static const struct tizen_input_device_manager_listener _tz_input_device_mgr_listener =
{
_ecore_wl2_input_device_manager_cb_device_add,
_ecore_wl2_input_device_manager_cb_device_remove,
_ecore_wl2_input_device_manager_cb_error,
_ecore_wl2_input_device_manager_cb_block_expired,
+ _ecore_wl2_input_device_manager_cb_max_touch_count,
};
void
_ecore_wl2_input_device_manager_setup(Ecore_Wl2_Display *ewd, unsigned int id, unsigned int version EINA_UNUSED)
{
ewd->wl.tz_input_device_manager =
- wl_registry_bind(ewd->wl.registry, id, &tizen_input_device_manager_interface, 2);
+ wl_registry_bind(ewd->wl.registry, id, &tizen_input_device_manager_interface, 4);
tizen_input_device_manager_add_listener(ewd->wl.tz_input_device_manager,
&_tz_input_device_mgr_listener, ewd);