devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6597d39e907cc700374789ad014eb42f0bf54e3d

commit 6597d39e907cc700374789ad014eb42f0bf54e3d
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Feb 17 16:15:52 2015 -0500

    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 <cp.mich...@samsung.com>
---
 src/lib/ecore_drm/ecore_drm_inputs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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);

-- 


Reply via email to