return -1;
}
- if (input->dev->fd_hash)
- eina_hash_add(input->dev->fd_hash, path, (void *)(intptr_t)fd);
-
return fd;
}
{
EINA_LIST_FREE(seat->devices, edev)
{
- if (edev->fd >= 0)
- close(edev->fd);
+ libinput_device_config_send_events_set_mode(edev->device,
+ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED);
_e_input_evdev_device_destroy(edev);
}
edev->seat = seat;
edev->device = device;
edev->path = eina_stringshare_printf("%s/%s", e_input_base_dir_get(), libinput_device_get_sysname(device));
- edev->fd = -1;
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD))
{
return;
}
- edev->fd = (int)(intptr_t)eina_hash_find(input->dev->fd_hash, edev->path);
-
/* append this device to the seat */
seat->devices = eina_list_append(seat->devices, edev);
/* remove this evdev from the seat's list of devices */
edev->seat->devices = eina_list_remove(edev->seat->devices, edev);
- if (input->dev->fd_hash)
- eina_hash_del_by_key(input->dev->fd_hash, edev->path);
-
- /* tell launcher to release device */
- if (edev->fd >= 0)
- {
- close(edev->fd);
- edev->fd = -1;
- }
-
/* destroy this evdev */
_e_input_evdev_device_destroy(edev);
}
struct libinput_device *device;
const char *path;
- int fd;
Ecore_Device *ecore_dev;
Eina_List *ecore_dev_list;