summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-02-17 16:18:13 -0500
committerChris Michael <cp.michael@samsung.com>2015-02-17 16:19:55 -0500
commitfd0de9ae5c19dd333ec28b0c1712be76b2d68097 (patch)
tree991e1d8caf88365d8feb893ae45348aef0ae72e4 /src/lib/ecore_drm
parent6597d39e907cc700374789ad014eb42f0bf54e3d (diff)
ecore-drm: Fix issue with ecore_drm_evdev->path being incorrect
Summary: When we try to ReleaseDevice of our evdev structure, the 'path' which was getting passed to our logind code was incorrect. This was due to libinput not providing a function to get the full device path. We fix this by making some eeze udev calls to find this device and get the full device path. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_evdev.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index fbc595996d..2358a8d35b 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -545,6 +545,7 @@ Ecore_Drm_Evdev *
545_ecore_drm_evdev_device_create(Ecore_Drm_Seat *seat, struct libinput_device *device) 545_ecore_drm_evdev_device_create(Ecore_Drm_Seat *seat, struct libinput_device *device)
546{ 546{
547 Ecore_Drm_Evdev *edev; 547 Ecore_Drm_Evdev *edev;
548 Eina_List *devices;
548 549
549 EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL); 550 EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
550 551
@@ -555,6 +556,26 @@ _ecore_drm_evdev_device_create(Ecore_Drm_Seat *seat, struct libinput_device *dev
555 edev->device = device; 556 edev->device = device;
556 edev->path = eina_stringshare_add(libinput_device_get_sysname(device)); 557 edev->path = eina_stringshare_add(libinput_device_get_sysname(device));
557 558
559 devices = eeze_udev_find_by_filter("input", NULL, edev->path);
560 if (eina_list_count(devices) >= 1)
561 {
562 Eina_List *l;
563 const char *dev, *name;
564
565 EINA_LIST_FOREACH(devices, l, dev)
566 {
567 name = eeze_udev_syspath_get_devname(dev);
568 if (strstr(name, edev->path))
569 {
570 eina_stringshare_replace(&edev->path, eeze_udev_syspath_get_devpath(dev));
571 break;
572 }
573 }
574
575 EINA_LIST_FREE(devices, dev)
576 eina_stringshare_del(dev);
577 }
578
558 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) 579 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD))
559 { 580 {
560 edev->seat_caps |= EVDEV_SEAT_KEYBOARD; 581 edev->seat_caps |= EVDEV_SEAT_KEYBOARD;