From: Artur Świgoń Date: Fri, 20 Jan 2023 13:32:13 +0000 (+0100) Subject: elc_hoversel: Fix checking at_point coordinates X-Git-Tag: accepted/tizen/unified/20230215.100741~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c188e57a2710fea952bc468c4d807c6d09803e7;p=platform%2Fupstream%2Fefl.git elc_hoversel: Fix checking at_point coordinates The conditions were wrong, but thankfully there exists the IS_INSIDE macro. Change-Id: I6635ec7c459509003d4a73a5d864e6d2deaf12a9 --- diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c index 40bd3e6..d17f5cd 100644 --- a/src/lib/elementary/elc_hoversel.c +++ b/src/lib/elementary/elc_hoversel.c @@ -1150,7 +1150,7 @@ _elm_hoversel_efl_access_component_accessible_at_point_get(const Eo *obj, Elm_Ho evas_object_geometry_get(VIEW(it), &wx, &wy, &ww, &wh); Efl_Access_State_Set ss = efl_access_object_state_set_get(VIEW(it)); Eina_Bool is_item_showing = !!STATE_TYPE_GET(ss, EFL_ACCESS_STATE_TYPE_SHOWING); - if (is_item_showing && !((x > wx + ww) || (y > wy + wh) || (x < wx - ww) || (y < wy - wh))) + if (is_item_showing && IS_INSIDE(x, y, wx, wy, ww, wh)) return VIEW(it); }