evas event handling - fix incorrect object reporting
this fixes event reporting for mouse in/out/move/down/up due to evas just totally getting tese objects wrong. this fixes T3718 @fix
This commit is contained in:
parent
f955a20c02
commit
9f0fd66ab8
|
@ -144,7 +144,7 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
|
||||||
int inside;
|
int inside;
|
||||||
|
|
||||||
if (!list) return in;
|
if (!list) return in;
|
||||||
for (obj = _EINA_INLIST_CONTAINER(obj, list);
|
for (obj = _EINA_INLIST_CONTAINER(obj, eina_inlist_last(list));
|
||||||
obj;
|
obj;
|
||||||
obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev))
|
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;
|
*no_rep = 1;
|
||||||
return in;
|
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 (!source)
|
||||||
{
|
{
|
||||||
if (evas_event_passes_through(eo_obj, obj)) continue;
|
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,
|
const Eina_Inlist *list, Evas_Object *stop,
|
||||||
int x, int y, int *no_rep, Eina_Bool source)
|
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,
|
return _evas_event_object_list_raw_in_get(eo_e, in, list->last, stop, x, y,
|
||||||
no_rep, source);
|
no_rep, source);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1157,13 +1157,13 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
/* Update left limit */
|
/* Update left limit */
|
||||||
if (noclip && x < smart_parent->cur.bounding_box.x)
|
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.w += smart_parent->cur.bounding_box.x - x;
|
||||||
smart_parent->cur.bounding_box.x = x;
|
smart_parent->cur.bounding_box.x = x;
|
||||||
|
|
||||||
propagate = EINA_TRUE;
|
propagate = EINA_TRUE;
|
||||||
}
|
}
|
||||||
else if ((px == smart_parent->prev.bounding_box.x &&
|
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))
|
|| (!noclip && x == smart_parent->cur.bounding_box.x))
|
||||||
{
|
{
|
||||||
computeminmax = EINA_TRUE;
|
computeminmax = EINA_TRUE;
|
||||||
|
@ -1178,7 +1178,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
propagate = EINA_TRUE;
|
propagate = EINA_TRUE;
|
||||||
}
|
}
|
||||||
else if ((py == smart_parent->prev.bounding_box.y &&
|
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))
|
|| (!noclip && y == smart_parent->cur.bounding_box.y))
|
||||||
{
|
{
|
||||||
computeminmax = EINA_TRUE;
|
computeminmax = EINA_TRUE;
|
||||||
|
@ -1187,8 +1187,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
/* Update right limit */
|
/* Update right limit */
|
||||||
if (noclip && x + w > smart_parent->cur.bounding_box.x + smart_parent->cur.bounding_box.w)
|
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;
|
propagate = EINA_TRUE;
|
||||||
}
|
}
|
||||||
else if ((px + pw == smart_parent->prev.bounding_box.x + smart_parent->prev.bounding_box.w &&
|
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 */
|
/* Update bottom limit */
|
||||||
if (noclip && y + h > smart_parent->cur.bounding_box.y + smart_parent->cur.bounding_box.h)
|
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;
|
propagate = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1212,7 +1211,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
computeminmax = EINA_TRUE;
|
computeminmax = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeminmax)
|
if (computeminmax)
|
||||||
{
|
{
|
||||||
evas_object_smart_need_bounding_box_update(obj->smart.parent,
|
evas_object_smart_need_bounding_box_update(obj->smart.parent,
|
||||||
obj->smart.parent_data,
|
obj->smart.parent_data,
|
||||||
|
@ -1223,14 +1222,14 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
{
|
{
|
||||||
if (noclip)
|
if (noclip)
|
||||||
{
|
{
|
||||||
smart_parent->cur.bounding_box.x = x;
|
smart_parent->cur.bounding_box.x = x;
|
||||||
smart_parent->cur.bounding_box.y = y;
|
smart_parent->cur.bounding_box.y = y;
|
||||||
smart_parent->cur.bounding_box.w = w;
|
smart_parent->cur.bounding_box.w = w;
|
||||||
smart_parent->cur.bounding_box.h = h;
|
smart_parent->cur.bounding_box.h = h;
|
||||||
|
|
||||||
EINA_COW_STATE_WRITE_BEGIN(smart_obj, smart_write, cur)
|
EINA_COW_STATE_WRITE_BEGIN(smart_obj, smart_write, cur)
|
||||||
smart_write->valid_bounding_box = EINA_TRUE;
|
smart_write->valid_bounding_box = EINA_TRUE;
|
||||||
EINA_COW_STATE_WRITE_END(smart_obj, smart_write, cur);
|
EINA_COW_STATE_WRITE_END(smart_obj, smart_write, cur);
|
||||||
|
|
||||||
propagate = EINA_TRUE;
|
propagate = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1242,17 +1241,17 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_smart_bounding_box_get(Evas_Object *eo_obj,
|
evas_object_smart_bounding_box_get(Evas_Object *eo_obj,
|
||||||
Evas_Coord_Rectangle *cur_bounding_box,
|
Evas_Coord_Rectangle *cur_bounding_box,
|
||||||
Evas_Coord_Rectangle *prev_bounding_box)
|
Evas_Coord_Rectangle *prev_bounding_box)
|
||||||
{
|
{
|
||||||
Evas_Smart_Data *s = eo_data_scope_get(eo_obj, MY_CLASS);
|
Evas_Smart_Data *s = eo_data_scope_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
if (cur_bounding_box) memcpy(cur_bounding_box,
|
if (cur_bounding_box) memcpy(cur_bounding_box,
|
||||||
&s->cur.bounding_box,
|
&s->cur.bounding_box,
|
||||||
sizeof (*cur_bounding_box));
|
sizeof (*cur_bounding_box));
|
||||||
if (prev_bounding_box) memcpy(prev_bounding_box,
|
if (prev_bounding_box) memcpy(prev_bounding_box,
|
||||||
&s->prev.bounding_box,
|
&s->prev.bounding_box,
|
||||||
sizeof (*prev_bounding_box));
|
sizeof (*prev_bounding_box));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1413,24 +1412,25 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected
|
||||||
|
|
||||||
if (o == obj) continue ;
|
if (o == obj) continue ;
|
||||||
if (o->clip.clipees || o->is_static_clip) 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);
|
evas_object_smart_bounding_box_update(o->object, o);
|
||||||
|
|
||||||
tx = s->cur.bounding_box.x;
|
tx = s->cur.bounding_box.x;
|
||||||
ty = s->cur.bounding_box.y;
|
ty = s->cur.bounding_box.y;
|
||||||
tw = s->cur.bounding_box.x + s->cur.bounding_box.w;
|
tw = tx + s->cur.bounding_box.w;
|
||||||
th = s->cur.bounding_box.y + s->cur.bounding_box.h;
|
th = ty + s->cur.bounding_box.h;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tx = o->cur->geometry.x;
|
tx = o->cur->geometry.x;
|
||||||
ty = o->cur->geometry.y;
|
ty = o->cur->geometry.y;
|
||||||
tw = o->cur->geometry.x + o->cur->geometry.w;
|
tw = tx + o->cur->geometry.w;
|
||||||
th = o->cur->geometry.y + o->cur->geometry.h;
|
th = ty + o->cur->geometry.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx < minx) minx = tx;
|
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)
|
if (minx != os->cur.bounding_box.x)
|
||||||
{
|
{
|
||||||
os->cur.bounding_box.w += os->cur.bounding_box.x - minx;
|
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)
|
if (miny != os->cur.bounding_box.y)
|
||||||
{
|
{
|
||||||
os->cur.bounding_box.h += os->cur.bounding_box.y - miny;
|
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)
|
if (maxw != os->cur.bounding_box.x + os->cur.bounding_box.w)
|
||||||
|
|
Loading…
Reference in New Issue