forked from enlightenment/efl
evas: properly warn when linking object from different canvas.
SVN revision: 74968
This commit is contained in:
parent
07742ef737
commit
61c2345c55
|
@ -176,14 +176,44 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (obj->cur.clipper == clip) return;
|
if (obj->cur.clipper == clip) return;
|
||||||
if (obj == clip) return;
|
if (obj == clip)
|
||||||
|
{
|
||||||
|
CRIT("Setting clip %p on itself", obj)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (clip->delete_me)
|
||||||
|
{
|
||||||
|
CRIT("Setting deleted object %p as clip obj %p", clip, obj);
|
||||||
|
abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (obj->delete_me)
|
||||||
|
{
|
||||||
|
CRIT("Setting object %p as clip to deleted obj %p", clip, obj);
|
||||||
|
abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!obj->layer)
|
||||||
|
{
|
||||||
|
CRIT("No evas surface associated with object (%p)", obj);
|
||||||
|
abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((obj->layer && clip->layer) &&
|
||||||
|
(obj->layer->evas != clip->layer->evas))
|
||||||
|
{
|
||||||
|
CRIT("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas);
|
||||||
|
abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (evas_object_intercept_call_clip_set(obj, clip)) return;
|
if (evas_object_intercept_call_clip_set(obj, clip)) return;
|
||||||
// illegal to set anything but a rect as a clip
|
// illegal to set anything but a rect as a clip
|
||||||
/* if (clip->type != o_rect_type) */
|
if (clip->type != o_rect_type)
|
||||||
/* { */
|
{
|
||||||
/* ERR("For now a clip on other object than a rectangle is disabled"); */
|
ERR("For now a clip on other object than a rectangle is disabled");
|
||||||
/* return; */
|
return;
|
||||||
/* } */
|
}
|
||||||
if (obj->smart.smart)
|
if (obj->smart.smart)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart->smart_class->clip_set)
|
if (obj->smart.smart->smart_class->clip_set)
|
||||||
|
|
|
@ -447,7 +447,37 @@ evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
if (src == obj) return EINA_FALSE;
|
if (obj->delete_me)
|
||||||
|
{
|
||||||
|
CRIT("Setting deleted object %p as image source %p", src, obj);
|
||||||
|
abort();
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (src->delete_me)
|
||||||
|
{
|
||||||
|
CRIT("Setting object %p to deleted image source %p", src, obj);
|
||||||
|
abort();
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (!src->layer)
|
||||||
|
{
|
||||||
|
CRIT("No evas surface associated with source object (%p)", obj);
|
||||||
|
abort();
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
if ((obj->layer && src->layer) &&
|
||||||
|
(obj->layer->evas != src->layer->evas))
|
||||||
|
{
|
||||||
|
CRIT("Setting object %p from Evas (%p) from another Evas (%p)", src, src->layer->evas, obj->layer->evas);
|
||||||
|
abort();
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (src == obj)
|
||||||
|
{
|
||||||
|
CRIT("Setting object %p as a source for itself", obj);
|
||||||
|
abort();
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
if (o->cur.source == src) return EINA_TRUE;
|
if (o->cur.source == src) return EINA_TRUE;
|
||||||
|
|
||||||
_evas_object_image_cleanup(obj, o);
|
_evas_object_image_cleanup(obj, o);
|
||||||
|
|
Loading…
Reference in New Issue