ecore-drm: Cleanup ecore_drm_input code to add/remove devices

This removes calls to the ecore_drm slave binary, and makes use of our
new dbus function calls to open an input device

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-07-15 09:40:39 -04:00
parent 87049f9124
commit c043021397
1 changed files with 6 additions and 11 deletions

View File

@ -50,23 +50,18 @@ _device_add(Ecore_Drm_Input *input, struct udev_device *device)
node = udev_device_get_devnode(device);
strcpy(n, node);
fd = open(n, O_RDWR | O_NONBLOCK);
if (fd == -1)
fd = _ecore_drm_dbus_device_open(n);
if (fd < 0)
{
ERR("FAILED TO OPEN %s: %m", n);
return EINA_FALSE;
}
/* _ecore_drm_message_send(ECORE_DRM_OP_DEVICE_OPEN, -1, n, strlen(n)); */
/* _ecore_drm_message_receive(ECORE_DRM_OP_DEVICE_OPEN, &fd, NULL, 0); */
/* DBG("Opened Restricted Input: %s %d", node, fd); */
DBG("Opened Restricted Input: %s %d", node, fd);
if (!(edev = _ecore_drm_evdev_device_create(seat, node, fd)))
{
close(fd);
/* _ecore_drm_message_send(ECORE_DRM_OP_DEVICE_CLOSE, fd, NULL, 0); */
/* _ecore_drm_message_receive(ECORE_DRM_OP_DEVICE_OPEN, &fd, NULL, 0); */
return EINA_FALSE;
}
return EINA_FALSE;
seat->devices = eina_list_append(seat->devices, edev);