From ea59109665a6b88b821ff8e861c91287ef477444 Mon Sep 17 00:00:00 2001 From: Bartlomiej Grzelewski Date: Wed, 8 Apr 2020 16:54:50 +0200 Subject: [PATCH] flipselector: returns invalid widget Widget returned by flip selector does not contains x,y coordinates. Change-Id: Id9df8a683909403d3a8d7e02afb90f4ce8971038 --- src/lib/elementary/elm_flipselector.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.7.4