From: Chris Michael Date: Tue, 17 Feb 2015 21:15:52 +0000 (-0500) Subject: ecore-drm: Fix issue of ecore_drm not calling ReleaseDevice when an X-Git-Tag: v1.14.0-alpha1~471 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6597d39e907cc700374789ad014eb42f0bf54e3d;p=platform%2Fupstream%2Fefl.git ecore-drm: Fix issue of ecore_drm not calling ReleaseDevice when an input is destroyed Summary: This fixes an issue where if you VT switch away from a running Enlightenment and VT switch back, then input would no longer be working. This was because we never called ReleaseDevice (dbus call) when we destroyed a device, so any calls to recreate the device would fail in libinput due to control already being taken. @fix Signed-off-by: Chris Michael --- diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c index 45dce8f..d83f229 100644 --- a/src/lib/ecore_drm/ecore_drm_inputs.c +++ b/src/lib/ecore_drm/ecore_drm_inputs.c @@ -122,6 +122,9 @@ _device_removed(Ecore_Drm_Input *input EINA_UNUSED, struct libinput_device *devi /* remove this evdev from the seat's list of devices */ edev->seat->devices = eina_list_remove(edev->seat->devices, edev); + /* tell launcher to release device */ + _ecore_drm_launcher_device_close(edev->path, edev->fd); + /* destroy this evdev */ _ecore_drm_evdev_device_destroy(edev); } @@ -280,7 +283,10 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev) EINA_LIST_FREE(dev->seats, seat) { EINA_LIST_FREE(seat->devices, edev) - _ecore_drm_evdev_device_destroy(edev); + { + _ecore_drm_launcher_device_close(edev->path, edev->fd); + _ecore_drm_evdev_device_destroy(edev); + } if (seat->name) eina_stringshare_del(seat->name); free(seat);