e_devicemgr_inputgen: fix to convert clas to Ecore_Device_Class when deinit generator 32/294832/1 accepted/tizen/7.0/unified/20230628.131353
authorduna.oh <duna.oh@samsung.com>
Mon, 26 Jun 2023 08:01:28 +0000 (17:01 +0900)
committerduna.oh <duna.oh@samsung.com>
Tue, 27 Jun 2023 09:05:04 +0000 (18:05 +0900)
There was a bug sending a enum TIZEN_INPUT_DEVICE_MANAGER_CLAS_XXX
to _e_devicemgr_inputgen_list_get() API which takes Ecore_Device_Class type
as a argument.

Change-Id: Iaf6093d73134322a8c2442b022b0d49cda6c5126

src/bin/e_devicemgr_inputgen.c

index a299876d954a4e11e86a14f654bf7a9589d705e4..6a67ca492ac81cf9e3f7d93250d263052670aa95 100644 (file)
@@ -1,5 +1,21 @@
 #include "e_devicemgr_private.h"
 
+static Ecore_Device_Class
+_e_devicemgr_inputgen_class_to_ecore_device_class(unsigned int clas)
+{
+   switch(clas)
+     {
+      case TIZEN_INPUT_DEVICE_MANAGER_CLAS_MOUSE:
+         return ECORE_DEVICE_CLASS_MOUSE;
+      case TIZEN_INPUT_DEVICE_MANAGER_CLAS_KEYBOARD:
+         return ECORE_DEVICE_CLASS_KEYBOARD;
+      case TIZEN_INPUT_DEVICE_MANAGER_CLAS_TOUCHSCREEN:
+         return ECORE_DEVICE_CLASS_TOUCH;
+      default:
+         return ECORE_DEVICE_CLASS_NONE;
+     }
+}
+
 static Eina_List **
 _e_devicemgr_inputgen_list_get(Ecore_Device_Class clas)
 {
@@ -653,8 +669,10 @@ _e_devicemgr_inputgen_client_del(struct wl_client *client, unsigned int clas)
    E_Devicemgr_Inputgen_Client_Data *cdata;
    E_Devicemgr_Inputgen_Device_Data *ddata;
    Eina_List *l, *ll, *l_next, *ll_next, **list;
+   Ecore_Device_Class eclas = ECORE_DEVICE_CLASS_NONE;
 
-   list = _e_devicemgr_inputgen_list_get(clas);
+   eclas = _e_devicemgr_inputgen_class_to_ecore_device_class(clas);
+   list = _e_devicemgr_inputgen_list_get(eclas);
    EINA_SAFETY_ON_NULL_RETURN(list);
 
    EINA_LIST_FOREACH_SAFE(*list, l, l_next, ddata)