e_devicemgr_input: fix issue tizen_input_device_manager object is not found 83/305983/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 14 Feb 2024 10:46:45 +0000 (19:46 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 14 Feb 2024 11:13:21 +0000 (20:13 +0900)
errno 22 (invalid argument) occurs because the tizen_input_device_manager object is not found after receiving the device_remove event of the tizen_input_device_manager interface from the wayland client.

Change-Id: I372267cd2080bec95c341f97cb1cd6631e766d55
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/e_devicemgr_input.c

index fad3e48bf26de2e576802893ce5ca3710320c416..06ff2dc6d864264e4ab3ce1f8ae941b35633f113 100644 (file)
@@ -241,7 +241,6 @@ _e_devicemgr_input_device_add(const char *name, const char *identifier, const ch
 
    g_rec_mutex_lock(&e_devicemgr->device_list_mutex);
    e_devicemgr->device_list = eina_list_append(e_devicemgr->device_list, dev);
-   g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
 
    if (dev->clas == ECORE_DEVICE_CLASS_MOUSE)
      e_devicemgr->last_device_ptr = dev;
@@ -278,6 +277,8 @@ _e_devicemgr_input_device_add(const char *name, const char *identifier, const ch
    e_devicemgr_wl_device_add(dev);
    e_devicemgr_inputgen_get_device_info(dev);
    _e_devicemgr_detent_set_info(dev);
+
+   g_rec_mutex_unlock(&e_devicemgr->device_list_mutex);
 }
 
 static void