// TIZEN_ONLY(20171109): support a tizen_input_device_manager interface
static Eina_Bool
-_ecore_evas_wl_common_evas_device_find(Evas *evas, const char *identifier)
+_ecore_evas_wl_common_evas_device_find(Evas *evas, const char *name, const Evas_Device_Class clas, const char *identifier)
{
Eina_List *list, *l;
Evas_Device *device;
+ const char *evas_device_name;
const char *evas_device_description;
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(identifier, EINA_FALSE);
list = (Eina_List *)evas_device_list(evas, NULL);
EINA_LIST_FOREACH(list, l, device)
{
+ evas_device_name = evas_device_name_get(device);
evas_device_description = evas_device_description_get(device);
- if (!evas_device_description) continue;
+ if (!evas_device_name || !evas_device_description) continue;
- if (_ecore_evas_wl_common_strcmp(evas_device_description, identifier))
+ if ((evas_device_class_get(device) == clas) &&
+ _ecore_evas_wl_common_strcmp(evas_device_name, name) &&
+ _ecore_evas_wl_common_strcmp(evas_device_description, identifier))
{
return EINA_TRUE;
}
wdata = ee->engine.data;
if (display != wdata->display) continue;
- if (_ecore_evas_wl_common_evas_device_find(ee->evas, ev->identifier)) continue;
+ if (_ecore_evas_wl_common_evas_device_find(ee->evas, ev->name, ev->clas, ev->identifier)) continue;
seat = _ecore_evas_wl_common_default_seat_get(ee->evas);
evas_device_add_full(ee->evas, ev->name,