Evas masking: Fix precise_is_inside for masked smart objects
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 16 Jan 2015 02:45:28 +0000 (11:45 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 16 Jan 2015 03:09:58 +0000 (12:09 +0900)
The flag should be set on the mask itself.
Checking for (x,y) being inside the mask can be an expensive operation,
so further optimization will be required.

src/lib/evas/canvas/evas_events.c

index 39811c4..ae97030 100644 (file)
@@ -63,8 +63,13 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
           {
              if (obj->is_smart)
                {
+                  Evas_Object_Protected_Data *clip = obj->cur->clipper;
                   int norep = 0;
 
+                  if (clip && clip->mask->is_mask && clip->precise_is_inside)
+                    if (!evas_object_is_inside(clip->object, clip, x, y))
+                      continue;
+
                   if ((obj->map->cur.usemap) && (obj->map->cur.map) &&
                       (obj->map->cur.map->count == 4))
                     {