forked from enlightenment/efl
i think this will fix the layer thing nathan found
SVN revision: 18380
This commit is contained in:
parent
081335eda4
commit
69cc1760ef
|
@ -15,6 +15,7 @@ evas_object_inject(Evas_Object *obj, Evas *e)
|
||||||
evas_layer_add(lay);
|
evas_layer_add(lay);
|
||||||
}
|
}
|
||||||
lay->objects = evas_object_list_append(lay->objects, obj);
|
lay->objects = evas_object_list_append(lay->objects, obj);
|
||||||
|
lay->usage++;
|
||||||
obj->layer = lay;
|
obj->layer = lay;
|
||||||
obj->in_layer = 1;
|
obj->in_layer = 1;
|
||||||
}
|
}
|
||||||
|
@ -24,9 +25,10 @@ evas_object_release(Evas_Object *obj, int clean_layer)
|
||||||
{
|
{
|
||||||
if (!obj->in_layer) return;
|
if (!obj->in_layer) return;
|
||||||
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
|
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
|
||||||
|
obj->layer->usage--;
|
||||||
if (clean_layer)
|
if (clean_layer)
|
||||||
{
|
{
|
||||||
if (!obj->layer->objects)
|
if (obj->layer->usage <= 0)
|
||||||
{
|
{
|
||||||
evas_layer_del(obj->layer);
|
evas_layer_del(obj->layer);
|
||||||
evas_layer_free(obj->layer);
|
evas_layer_free(obj->layer);
|
||||||
|
|
|
@ -139,6 +139,7 @@ evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
|
||||||
evas_object_release(obj, 1);
|
evas_object_release(obj, 1);
|
||||||
obj->layer = smart_obj->layer;
|
obj->layer = smart_obj->layer;
|
||||||
obj->cur.layer = obj->layer->layer;
|
obj->cur.layer = obj->layer->layer;
|
||||||
|
obj->layer->usage++;
|
||||||
obj->smart.parent = smart_obj;
|
obj->smart.parent = smart_obj;
|
||||||
smart_obj->smart.contained = evas_object_list_append(smart_obj->smart.contained, obj);
|
smart_obj->smart.contained = evas_object_list_append(smart_obj->smart.contained, obj);
|
||||||
evas_object_smart_member_cache_invalidate(obj);
|
evas_object_smart_member_cache_invalidate(obj);
|
||||||
|
@ -163,6 +164,7 @@ evas_object_smart_member_del(Evas_Object *obj)
|
||||||
obj->smart.parent->smart.contained = evas_object_list_remove(obj->smart.parent->smart.contained, obj);
|
obj->smart.parent->smart.contained = evas_object_list_remove(obj->smart.parent->smart.contained, obj);
|
||||||
obj->smart.parent = NULL;
|
obj->smart.parent = NULL;
|
||||||
evas_object_smart_member_cache_invalidate(obj);
|
evas_object_smart_member_cache_invalidate(obj);
|
||||||
|
obj->layer->usage--;
|
||||||
obj->cur.layer = obj->layer->layer;
|
obj->cur.layer = obj->layer->layer;
|
||||||
evas_object_inject(obj, obj->layer->evas);
|
evas_object_inject(obj, obj->layer->evas);
|
||||||
obj->restack = 1;
|
obj->restack = 1;
|
||||||
|
|
|
@ -286,6 +286,7 @@ struct _Evas_Layer
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
|
|
||||||
void *engine_data;
|
void *engine_data;
|
||||||
|
int usage;
|
||||||
unsigned char delete_me : 1;
|
unsigned char delete_me : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue