aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-04-25 14:01:48 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-04-30 15:22:52 +0200
commit139efaaba325edf738f6cdfb678acac774f100a8 (patch)
treeca1927ab84b954e165a0d16e743263030ff67a92
parentelm_****: do not make group items focusable (diff)
downloadefl-139efaaba325edf738f6cdfb678acac774f100a8.tar.gz
elm_interface_scrollable: rework filtering
A item might be in the middle of the viewport and still miss relations.
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 7f595a6863..bc4e76b3d4 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -4824,10 +4824,21 @@ static Eina_Bool
_filter_cb(const void *iterator EINA_UNUSED, void *data, void *fdata)
{
Eina_Rect geom;
+ int min_x, max_x, min_y, max_y;
geom = efl_ui_focus_object_focus_geometry_get(data);
- return eina_rectangles_intersect(&geom.rect, fdata);
+ min_x = geom.rect.x;
+ min_y = geom.rect.y;
+ max_x = eina_rectangle_max_x(&geom.rect);
+ max_y = eina_rectangle_max_y(&geom.rect);
+
+ Eina_Bool inside = eina_rectangle_coords_inside(fdata, min_x, min_y) ||
+ eina_rectangle_coords_inside(fdata, min_x, max_y) ||
+ eina_rectangle_coords_inside(fdata, max_x, min_y) ||
+ eina_rectangle_coords_inside(fdata, max_x, max_y);
+
+ return inside;
}
EOLIAN static Eina_Iterator*