e_devicemgr->device_list = eina_list_append(e_devicemgr->device_list, dev);
- e_devicemgr_wl_device_add(dev);
- e_devicemgr_inputgen_get_device_info(dev);
- _e_devicemgr_detent_set_info(dev);
-
if (dev->clas == ECORE_DEVICE_CLASS_MOUSE)
e_devicemgr->last_device_ptr = dev;
if (!e_devicemgr->multi)
ELOGF("DEVMGR_TOUCH", "Failed to allocate memory for multi ptr. (finger=%d)\n", NULL, current_touch_count);
+
+ e_devicemgr_wl_touch_max_count_send(e_devicemgr->max_touch_count, NULL, NULL);
}
}
if (!e_devicemgr->last_device_kbd && dev->clas == ECORE_DEVICE_CLASS_KEYBOARD)
e_devicemgr->last_device_kbd = dev;
+
+ e_devicemgr_wl_device_add(dev);
+ e_devicemgr_inputgen_get_device_info(dev);
+ _e_devicemgr_detent_set_info(dev);
}
static void
tizen_input_device_manager_send_block_expired(resource);
}
+void
+e_devicemgr_wl_touch_max_count_send(int slot, struct wl_resource *res, struct wl_resource *seat_res)
+{
+ struct wl_resource *seat_resource, *dev_mgr_resource;
+ Eina_List *l, *ll;
+ uint32_t serial;
+ struct wl_client *wc;
+
+ serial = wl_display_next_serial(e_comp_wl->wl.disp);
+
+ if (res && seat_res)
+ {
+ if (wl_resource_get_version(res) < 4) return;
+ tizen_input_device_manager_send_max_touch_count(res, serial, slot, seat_res);
+ }
+ else
+ {
+ EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, seat_resource)
+ {
+ wc = wl_resource_get_client(seat_resource);
+
+ EINA_LIST_FOREACH(e_devicemgr->wl_data->resources, ll, dev_mgr_resource)
+ {
+ if (wl_resource_get_client(dev_mgr_resource) != wc) continue;
+ if (wl_resource_get_version(dev_mgr_resource) < 4) continue;
+ tizen_input_device_manager_send_max_touch_count(dev_mgr_resource, serial, slot, seat_resource);
+ }
+ }
+ }
+}
+
+
static void
_e_devicemgr_wl_cb_block_events(struct wl_client *client, struct wl_resource *resource, uint32_t serial, uint32_t clas, uint32_t duration)
{
wl_array_init(&axes);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
+ if (e_devicemgr->max_touch_count > 0)
+ {
+ e_devicemgr_wl_touch_max_count_send(e_devicemgr->max_touch_count, res, seat_res);
+ }
+
EINA_LIST_FOREACH(e_devicemgr->device_list, l, dev)
{
device_res = wl_resource_create(client, &tizen_input_device_interface, 1, 0);
/* try to add tizen_input_device_manager to wayland globals */
e_devicemgr->wl_data->global = wl_global_create(e_comp_wl->wl.disp,
- &tizen_input_device_manager_interface, 3,
+ &tizen_input_device_manager_interface, 4,
NULL, _e_devicemgr_wl_cb_bind);
if (!e_devicemgr->wl_data->global)
{