diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 8bf07e45b3..28725f3553 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -144,7 +144,7 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in, int inside; if (!list) return in; - for (obj = _EINA_INLIST_CONTAINER(obj, list); + for (obj = _EINA_INLIST_CONTAINER(obj, eina_inlist_last(list)); obj; obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) { @@ -154,6 +154,15 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in, *no_rep = 1; return in; } + + evas_object_clip_recalc(obj); + if ((!RECTS_INTERSECT(x, y, 1, 1, + obj->cur->cache.clip.x, + obj->cur->cache.clip.y, + obj->cur->cache.clip.w, + obj->cur->cache.clip.h))) + continue; + if (!source) { if (evas_event_passes_through(eo_obj, obj)) continue; @@ -989,7 +998,6 @@ _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep, Eina_Bool source) { - if (!list) return NULL; return _evas_event_object_list_raw_in_get(eo_e, in, list->last, stop, x, y, no_rep, source); } diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index b268ff3f7a..a97112038a 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1157,13 +1157,13 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data /* Update left limit */ if (noclip && x < smart_parent->cur.bounding_box.x) { - smart_parent->cur.bounding_box.w += smart_parent->cur.bounding_box.x - x; - smart_parent->cur.bounding_box.x = x; + smart_parent->cur.bounding_box.w += smart_parent->cur.bounding_box.x - x; + smart_parent->cur.bounding_box.x = x; propagate = EINA_TRUE; } else if ((px == smart_parent->prev.bounding_box.x && - x > smart_parent->cur.bounding_box.x) + x > smart_parent->cur.bounding_box.x) || (!noclip && x == smart_parent->cur.bounding_box.x)) { computeminmax = EINA_TRUE; @@ -1178,7 +1178,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data propagate = EINA_TRUE; } else if ((py == smart_parent->prev.bounding_box.y && - y > smart_parent->cur.bounding_box.y) + y > smart_parent->cur.bounding_box.y) || (!noclip && y == smart_parent->cur.bounding_box.y)) { computeminmax = EINA_TRUE; @@ -1187,8 +1187,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data /* Update right limit */ if (noclip && x + w > smart_parent->cur.bounding_box.x + smart_parent->cur.bounding_box.w) { - smart_parent->cur.bounding_box.w = x + w - smart_parent->cur.bounding_box.x; - + smart_parent->cur.bounding_box.w = x + w - smart_parent->cur.bounding_box.x; propagate = EINA_TRUE; } else if ((px + pw == smart_parent->prev.bounding_box.x + smart_parent->prev.bounding_box.w && @@ -1201,7 +1200,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data /* Update bottom limit */ if (noclip && y + h > smart_parent->cur.bounding_box.y + smart_parent->cur.bounding_box.h) { - smart_parent->cur.bounding_box.h = y + h - smart_parent->cur.bounding_box.y; + smart_parent->cur.bounding_box.h = y + h - smart_parent->cur.bounding_box.y; propagate = EINA_TRUE; } @@ -1212,7 +1211,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data computeminmax = EINA_TRUE; } - if (computeminmax) + if (computeminmax) { evas_object_smart_need_bounding_box_update(obj->smart.parent, obj->smart.parent_data, @@ -1223,14 +1222,14 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data { if (noclip) { - smart_parent->cur.bounding_box.x = x; - smart_parent->cur.bounding_box.y = y; - smart_parent->cur.bounding_box.w = w; - smart_parent->cur.bounding_box.h = h; + smart_parent->cur.bounding_box.x = x; + smart_parent->cur.bounding_box.y = y; + smart_parent->cur.bounding_box.w = w; + smart_parent->cur.bounding_box.h = h; - EINA_COW_STATE_WRITE_BEGIN(smart_obj, smart_write, cur) - smart_write->valid_bounding_box = EINA_TRUE; - EINA_COW_STATE_WRITE_END(smart_obj, smart_write, cur); + EINA_COW_STATE_WRITE_BEGIN(smart_obj, smart_write, cur) + smart_write->valid_bounding_box = EINA_TRUE; + EINA_COW_STATE_WRITE_END(smart_obj, smart_write, cur); propagate = EINA_TRUE; } @@ -1242,17 +1241,17 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data void evas_object_smart_bounding_box_get(Evas_Object *eo_obj, - Evas_Coord_Rectangle *cur_bounding_box, - Evas_Coord_Rectangle *prev_bounding_box) + Evas_Coord_Rectangle *cur_bounding_box, + Evas_Coord_Rectangle *prev_bounding_box) { Evas_Smart_Data *s = eo_data_scope_get(eo_obj, MY_CLASS); if (cur_bounding_box) memcpy(cur_bounding_box, - &s->cur.bounding_box, - sizeof (*cur_bounding_box)); + &s->cur.bounding_box, + sizeof (*cur_bounding_box)); if (prev_bounding_box) memcpy(prev_bounding_box, - &s->prev.bounding_box, - sizeof (*prev_bounding_box)); + &s->prev.bounding_box, + sizeof (*prev_bounding_box)); } void @@ -1413,24 +1412,25 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected if (o == obj) continue ; if (o->clip.clipees || o->is_static_clip) continue ; + if (!o->cur->visible) continue; - if (o->is_smart) + if (o->is_smart) { - Evas_Smart_Data *s = eo_data_scope_get(o->object, MY_CLASS); + Evas_Smart_Data *s = eo_data_scope_get(o->object, MY_CLASS); evas_object_smart_bounding_box_update(o->object, o); tx = s->cur.bounding_box.x; ty = s->cur.bounding_box.y; - tw = s->cur.bounding_box.x + s->cur.bounding_box.w; - th = s->cur.bounding_box.y + s->cur.bounding_box.h; + tw = tx + s->cur.bounding_box.w; + th = ty + s->cur.bounding_box.h; } else { tx = o->cur->geometry.x; ty = o->cur->geometry.y; - tw = o->cur->geometry.x + o->cur->geometry.w; - th = o->cur->geometry.y + o->cur->geometry.h; + tw = tx + o->cur->geometry.w; + th = ty + o->cur->geometry.h; } if (tx < minx) minx = tx; @@ -1442,13 +1442,13 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected if (minx != os->cur.bounding_box.x) { os->cur.bounding_box.w += os->cur.bounding_box.x - minx; - os->cur.bounding_box.x = minx; + os->cur.bounding_box.x = minx; } if (miny != os->cur.bounding_box.y) { os->cur.bounding_box.h += os->cur.bounding_box.y - miny; - os->cur.bounding_box.y = miny; + os->cur.bounding_box.y = miny; } if (maxw != os->cur.bounding_box.x + os->cur.bounding_box.w)