From afbe8ade6b7f99d5158be931a13971bb0681509f Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Wed, 26 Apr 2017 17:16:16 +0900 Subject: [PATCH] evas: fix logic in evas_events.c Summary: when collecting the objects under a mouse pointer, evas uses the geometry of an object to decide whether the mouse pointer is inside the area of the object, which is inappropriate for a mapped object. so mapped objects don't receive mouse events when they should. this patch fixes the issue. Test Plan: A sample code will be added as comments Reviewers: jpeg, raster Subscribers: cedric, eunue Differential Revision: https://phab.enlightenment.org/D4826 --- src/lib/evas/canvas/evas_events.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index cfaee6e..dcb318d 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -142,18 +142,25 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in, // for plan b and doing this on the fly. it's only for event or // callback handling so its a small percentage of the time, but // it's better that we get this right - if (obj->is_smart) - { - Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 }; - evas_object_smart_bounding_box_update(obj); - evas_object_smart_bounding_box_get(obj, &bounding_box, NULL); - c = bounding_box; - } + if (EINA_UNLIKELY((!!obj->map) && (obj->map->cur.map) + && (obj->map->cur.usemap))) + c = obj->map->cur.map->normal_geometry; else { - if (obj->clip.clipees) continue; - c = obj->cur->geometry; + if (obj->is_smart) + { + Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 }; + + evas_object_smart_bounding_box_update(obj); + evas_object_smart_bounding_box_get(obj, &bounding_box, NULL); + c = bounding_box; + } + else + { + if (obj->clip.clipees) continue; + c = obj->cur->geometry; + } } clip_calc(obj->cur->clipper, &c); // only worry about objects that intersect INCLUDING clippint -- 2.7.4