From: duna.oh Date: Mon, 26 Jun 2023 08:01:28 +0000 (+0900) Subject: e_devicemgr_inputgen: fix to convert clas to Ecore_Device_Class when deinit generator X-Git-Tag: accepted/tizen/unified/20230627.025439^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df45d53a208af4d27c74f3f901024c6ca5ef569c;p=platform%2Fupstream%2Fenlightenment.git e_devicemgr_inputgen: fix to convert clas to Ecore_Device_Class when deinit generator 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 --- diff --git a/src/bin/e_devicemgr_inputgen.c b/src/bin/e_devicemgr_inputgen.c index 62c61d994d..1bb4a9c489 100644 --- a/src/bin/e_devicemgr_inputgen.c +++ b/src/bin/e_devicemgr_inputgen.c @@ -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)