elc_hoversel: Fix checking at_point coordinates 67/287167/1
authorArtur Świgoń <a.swigon@samsung.com>
Fri, 20 Jan 2023 13:32:13 +0000 (14:32 +0100)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 20 Jan 2023 13:36:39 +0000 (14:36 +0100)
The conditions were wrong, but thankfully there exists the IS_INSIDE macro.

Change-Id: I6635ec7c459509003d4a73a5d864e6d2deaf12a9

src/lib/elementary/elc_hoversel.c

index 40bd3e6..d17f5cd 100644 (file)
@@ -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);
      }