From: Bartlomiej Grzelewski Date: Wed, 8 Apr 2020 14:54:50 +0000 (+0200) Subject: flipselector: returns invalid widget X-Git-Tag: submit/tizen/20200412.213308~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea59109665a6b88b821ff8e861c91287ef477444;p=platform%2Fupstream%2Fefl.git flipselector: returns invalid widget Widget returned by flip selector does not contains x,y coordinates. Change-Id: Id9df8a683909403d3a8d7e02afb90f4ce8971038 --- diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c index 913cbfc..2ed2950 100644 --- a/src/lib/elementary/elm_flipselector.c +++ b/src/lib/elementary/elm_flipselector.c @@ -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;