From: Doyoun Kang Date: Mon, 20 May 2024 10:23:27 +0000 (+0900) Subject: fix coverity issue - unused value X-Git-Tag: accepted/tizen/unified/20240521.104305^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=HEAD;hp=ea0ec1bc960a47c43d2e5d82ada654d2c5e48cf0;p=platform%2Fcore%2Fapi%2Fefl-util.git fix coverity issue - unused value Change-Id: I5a3b5cacaa993b86f5381a7e8ad340cf0967c2ab --- diff --git a/packaging/capi-ui-efl-util.spec b/packaging/capi-ui-efl-util.spec index 2f1e6e1..88dd9d7 100644 --- a/packaging/capi-ui-efl-util.spec +++ b/packaging/capi-ui-efl-util.spec @@ -1,12 +1,13 @@ Name: capi-ui-efl-util Summary: An EFL utility library in Tizen C API -Version: 0.7.25 +Version: 0.7.28 Release: 1 Group: Graphics & UI Framework/API License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1001: capi-ui-efl-util.manifest +Source1002: run-unittest.sh BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(wayland-client) @@ -34,11 +35,11 @@ Requires: %{name} = %{version}-%{release} %description devel %devel_desc -%package -n efl-util-tests +%package unittests Summary: Tizen EFL utility library unit tests package Group: Development/Libraries -%description -n efl-util-tests +%description unittests Test module for testing efl-util APIs %if 0%{?gcov:1} @@ -76,6 +77,9 @@ mkdir -p "$gcno_obj_dir" find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';' %endif +mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name} +install -m 0755 %SOURCE1002 %{buildroot}%{_bindir}/tizen-unittests/%{name}/ + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -94,9 +98,10 @@ find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';' %{_libdir}/libcapi-ui-efl-util.so %exclude %{_includedir}/ui/config.h -%files -n efl-util-tests +%files unittests %defattr(-,root,root,-) -%{_bindir}/efl-util-tests +%{_bindir}/capi-ui-efl-util-unittests +%{_bindir}/tizen-unittests/%{name}/run-unittest.sh %if 0%{?gcov:1} %files -n capi-ui-efl-util-gcov diff --git a/packaging/run-unittest.sh b/packaging/run-unittest.sh new file mode 100644 index 0000000..84fac83 --- /dev/null +++ b/packaging/run-unittest.sh @@ -0,0 +1,4 @@ +#!/bin/sh +pkill Oobe +pkill inputmethod +/usr/bin/capi-ui-efl-util-unittests diff --git a/src/efl_util.c b/src/efl_util.c index 91ced99..14a4b7e 100644 --- a/src/efl_util.c +++ b/src/efl_util.c @@ -718,6 +718,7 @@ efl_util_set_notification_window_level(Evas_Object *window, struct wl_surface *surface; Efl_Util_Wl_Surface_Lv_Info *lv_info; Ecore_Wl2_Window_Type wl_type; + int ret_dispatch = 0; res = _wl_init(); EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -733,8 +734,8 @@ efl_util_set_notification_window_level(Evas_Object *window, EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE); } - while (!_eflutil.wl.policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -771,10 +772,11 @@ efl_util_set_notification_window_level(Evas_Object *window, if (lv_info->wait_for_done) { int count = 0; - while (lv_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT)) + ret_dispatch = 0; + while (lv_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); count++; } @@ -808,6 +810,7 @@ efl_util_get_notification_window_level(Evas_Object *window, struct wl_surface *surface; Efl_Util_Wl_Surface_Lv_Info *lv_info; Ecore_Wl2_Window_Type wl_type; + int ret_dispatch = 0; res = _wl_init(); EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -823,8 +826,8 @@ efl_util_get_notification_window_level(Evas_Object *window, EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE); } - while (!_eflutil.wl.policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -836,10 +839,11 @@ efl_util_get_notification_window_level(Evas_Object *window, if (lv_info->wait_for_done) { int count = 0; - while ((lv_info->wait_for_done) && (count < NUM_EVENT_WAIT_DONE_COUNT)) + ret_dispatch = 0; + while ((lv_info->wait_for_done) && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); count++; } @@ -920,6 +924,7 @@ efl_util_set_window_screen_mode(Evas_Object *window, struct wl_surface *surface; Efl_Util_Wl_Surface_Scr_Mode_Info *scr_mode_info; Eina_Bool res; + int ret_dispatch = 0; res = _wl_init(); EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -927,8 +932,8 @@ efl_util_set_window_screen_mode(Evas_Object *window, wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window); if (wlwin) { - while (!_eflutil.wl.policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -961,10 +966,11 @@ efl_util_set_window_screen_mode(Evas_Object *window, if (scr_mode_info->wait_for_done) { int count = 0; - while (scr_mode_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT)) + ret_dispatch = 0; + while (scr_mode_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); count++; } @@ -998,6 +1004,7 @@ efl_util_get_window_screen_mode(Evas_Object *window, struct wl_surface *surface; Efl_Util_Wl_Surface_Scr_Mode_Info *scr_mode_info; Eina_Bool res; + int ret_dispatch = 0; res = _wl_init(); EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1005,8 +1012,8 @@ efl_util_get_window_screen_mode(Evas_Object *window, wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window); if (wlwin) { - while (!_eflutil.wl.policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -1017,10 +1024,11 @@ efl_util_get_window_screen_mode(Evas_Object *window, { if (scr_mode_info->wait_for_done) { - while (scr_mode_info->wait_for_done) + ret_dispatch = 0; + while (scr_mode_info->wait_for_done && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); } } @@ -1050,6 +1058,7 @@ efl_util_set_window_brightness(Evas_Object *window, int brightness) struct wl_surface *surface; Efl_Util_Wl_Surface_Brightness_Info *brightness_info; Eina_Bool res; + int ret_dispatch = 0; EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER); EINA_SAFETY_ON_FALSE_RETURN_VAL(brightness <= 100, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1060,8 +1069,8 @@ efl_util_set_window_brightness(Evas_Object *window, int brightness) wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window); if (wlwin) { - while (!_eflutil.wl.display_policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.display_policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -1094,10 +1103,11 @@ efl_util_set_window_brightness(Evas_Object *window, int brightness) if (brightness_info->wait_for_done) { int count = 0; - while (brightness_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT)) + ret_dispatch = 0; + while (brightness_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); count++; } @@ -1126,6 +1136,7 @@ efl_util_get_window_brightness(Evas_Object *window, int *brightness) struct wl_surface *surface; Efl_Util_Wl_Surface_Brightness_Info *brightness_info; Eina_Bool res; + int ret_dispatch = 0; EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER); EINA_SAFETY_ON_NULL_RETURN_VAL(brightness, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1136,8 +1147,8 @@ efl_util_get_window_brightness(Evas_Object *window, int *brightness) wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window); if (!wlwin) return EFL_UTIL_ERROR_INVALID_PARAMETER; - while (!_eflutil.wl.display_policy.proto) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.display_policy.proto && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); surface = ecore_wl2_window_surface_get(wlwin); EINA_SAFETY_ON_NULL_RETURN_VAL(surface, @@ -1148,10 +1159,11 @@ efl_util_get_window_brightness(Evas_Object *window, int *brightness) { if (brightness_info->wait_for_done) { - while (brightness_info->wait_for_done) + ret_dispatch = 0; + while (brightness_info->wait_for_done && (ret_dispatch != -1)) { ecore_wl2_display_flush(_eflutil.wl.wl2_display); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); } } *brightness = brightness_info->brightness; @@ -1243,6 +1255,7 @@ _efl_util_input_create_inputgen(unsigned int dev_type, const char *name, int *re { efl_util_inputgen_h inputgen_h = NULL; unsigned int clas = 0x0; + int ret_dispatch = 0; if (!dev_type || dev_type & ~(EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN @@ -1281,8 +1294,8 @@ _efl_util_input_create_inputgen(unsigned int dev_type, const char *name, int *re if (dev_type & EFL_UTIL_INPUT_DEVTYPE_POINTER) clas |= TIZEN_INPUT_DEVICE_MANAGER_CLAS_MOUSE; - while (!_eflutil.wl.devmgr.devicemgr) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.devmgr.devicemgr && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); if (with_name == 2) tizen_input_device_manager_init_generator_with_sync(_eflutil.wl.devmgr.devicemgr, clas, inputgen_h->name); @@ -1291,9 +1304,9 @@ _efl_util_input_create_inputgen(unsigned int dev_type, const char *name, int *re else tizen_input_device_manager_init_generator(_eflutil.wl.devmgr.devicemgr, clas); - - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = 0; + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); *ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1356,6 +1369,7 @@ API int efl_util_input_set_touch_count(int max_count) { int ret = EFL_UTIL_ERROR_NONE; + int ret_dispatch = 0; ret = _wl_init(); if (ret == (int)EINA_FALSE) @@ -1363,16 +1377,17 @@ efl_util_input_set_touch_count(int max_count) return EFL_UTIL_ERROR_INVALID_PARAMETER; } - while (!_eflutil.wl.devmgr.devicemgr) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while (!_eflutil.wl.devmgr.devicemgr && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); if (_eflutil.wl.devmgr.max_touch_count >= max_count) return EFL_UTIL_ERROR_NONE; tizen_input_device_manager_set_touch_count(_eflutil.wl.devmgr.devicemgr, max_count); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = 0; + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1390,6 +1405,7 @@ efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h) { int ret = EFL_UTIL_ERROR_NONE; unsigned int clas = 0x0; + int ret_dispatch = 0; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); if (inputgen_h->init_type & EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN) @@ -1409,8 +1425,8 @@ efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h) tizen_input_device_manager_deinit_generator(_eflutil.wl.devmgr.devicemgr, clas); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1422,6 +1438,7 @@ API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed) { int ret = EFL_UTIL_ERROR_NONE; + int ret_dispatch = 0; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); EINA_SAFETY_ON_NULL_RETURN_VAL(key_name, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1432,8 +1449,8 @@ efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name tizen_input_device_manager_generate_key(_eflutil.wl.devmgr.devicemgr, key_name, pressed); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1446,6 +1463,7 @@ efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, efl_util_input_touch_type_e touch_type, int x, int y) { int ret; + int ret_dispatch = 0; enum tizen_input_device_manager_pointer_event_type type; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1455,7 +1473,7 @@ efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, if (_eflutil.wl.devmgr.request_touch_count != 0 && _eflutil.wl.devmgr.max_touch_count != _eflutil.wl.devmgr.request_touch_count) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); if (idx >= _eflutil.wl.devmgr.max_touch_count) return EFL_UTIL_ERROR_INVALID_PARAMETER; @@ -1479,8 +1497,8 @@ efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, tizen_input_device_manager_generate_touch(_eflutil.wl.devmgr.devicemgr, type, x, y, idx); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1492,11 +1510,12 @@ static int _efl_util_input_generate_touch_axis_send(unsigned int type, double value) { int ret; + int ret_dispatch = 0; tizen_input_device_manager_generate_axis(_eflutil.wl.devmgr.devicemgr, type, wl_fixed_from_double(value)); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1583,6 +1602,7 @@ efl_util_input_generate_touch_axis(efl_util_inputgen_h inputgen_h, int idx, double pressure, double angle, double palm) { int ret, version; + int ret_dispatch = 0; enum tizen_input_device_manager_pointer_event_type type; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1618,8 +1638,8 @@ efl_util_input_generate_touch_axis(efl_util_inputgen_h inputgen_h, int idx, tizen_input_device_manager_generate_touch(_eflutil.wl.devmgr.devicemgr, type, x, y, idx); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1632,6 +1652,7 @@ API int efl_util_input_generate_pointer(efl_util_inputgen_h inputgen_h, int buttons, efl_util_input_pointer_type_e pointer_type, int x, int y) { int ret; + int ret_dispatch = 0; enum tizen_input_device_manager_pointer_event_type type; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1658,8 +1679,8 @@ efl_util_input_generate_pointer(efl_util_inputgen_h inputgen_h, int buttons, efl tizen_input_device_manager_generate_pointer(_eflutil.wl.devmgr.devicemgr, type, x, y, buttons); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; @@ -1671,6 +1692,7 @@ API int efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_pointer_wheel_type_e wheel_type, int value) { int ret, version; + int ret_dispatch = 0; enum tizen_input_device_manager_pointer_event_type type; EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER); @@ -1694,8 +1716,8 @@ efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_poi tizen_input_device_manager_generate_axis(_eflutil.wl.devmgr.devicemgr, type, wl_fixed_from_int(value)); - while (_eflutil.wl.devmgr.request_notified == -1) - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1)) + ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified); _eflutil.wl.devmgr.request_notified = -1; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6ba2ec8..a6f4e83 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(EXEC_NAME "efl-util-tests") +SET(EXEC_NAME "capi-ui-efl-util-unittests") SET(TC_SOURCES efl-util-tests.cpp