raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=afbe8ade6b7f99d5158be931a13971bb0681509f

commit afbe8ade6b7f99d5158be931a13971bb0681509f
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Wed Apr 26 17:16:16 2017 +0900

    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

-- 


Reply via email to