flipselector: returns invalid widget 19/230219/3
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>
Wed, 8 Apr 2020 14:54:50 +0000 (16:54 +0200)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 9 Apr 2020 04:45:31 +0000 (04:45 +0000)
Widget returned by flip selector does not contains
x,y coordinates.

Change-Id: Id9df8a683909403d3a8d7e02afb90f4ce8971038

src/lib/elementary/elm_flipselector.c

index 913cbfc..2ed2950 100644 (file)
@@ -1013,11 +1013,13 @@ _elm_flipselector_efl_access_component_accessible_at_point_get(Eo *obj, Elm_Flip
      }
 
    evas_object_geometry_get(_pd->access_top_button, &wx, &wy, &ww, &wh);
-   if (!((x > wx + ww) || (y > wy + wh) || (x < wx - ww) || (y < wy - wh)))
+   Eina_Rect r = EINA_RECT(wx,wy,ww,wh);
+   if (eina_rectangle_coords_inside(&r, x, y))
      return _pd->access_top_button;
 
    evas_object_geometry_get(_pd->access_bottom_button, &wx, &wy, &ww, &wh);
-   if (!((x > wx + ww) || (y > wy + wh) || (x < wx - ww) || (y < wy - wh)))
+   r = EINA_RECT(wx, wy, ww, wh);
+   if (eina_rectangle_coords_inside(&r, x, y))
      return _pd->access_bottom_button;
 
    return NULL;