e_devicemgr_inputgen: fix to convert clas to Ecore_Device_Class when deinit generator 66/294766/1 accepted/tizen/unified/20230627.025439
authorduna.oh <duna.oh@samsung.com>
Mon, 26 Jun 2023 08:01:28 +0000 (17:01 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 26 Jun 2023 08:28:06 +0000 (17:28 +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 62c61d994de0a34df3fa7b2f9fd20ac4a33c0199..1bb4a9c489691766361a953d3d30d2a9fa99fa3c 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)