aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_layer.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-11-08 11:59:21 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-11-08 11:59:21 +0000
commit69cc1760efc7df803a3033e3afd071dfc97cde87 (patch)
treeb67ee54a15b799323a177f801c56c91064ace802 /legacy/evas/src/lib/canvas/evas_layer.c
parentwe dont need no steenkin move signals (diff)
downloadefl-69cc1760efc7df803a3033e3afd071dfc97cde87.tar.gz
i think this will fix the layer thing nathan found
SVN revision: 18380
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_layer.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_layer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_layer.c b/legacy/evas/src/lib/canvas/evas_layer.c
index 4b11f544fd..f6e1228da0 100644
--- a/legacy/evas/src/lib/canvas/evas_layer.c
+++ b/legacy/evas/src/lib/canvas/evas_layer.c
@@ -15,6 +15,7 @@ evas_object_inject(Evas_Object *obj, Evas *e)
evas_layer_add(lay);
}
lay->objects = evas_object_list_append(lay->objects, obj);
+ lay->usage++;
obj->layer = lay;
obj->in_layer = 1;
}
@@ -24,9 +25,10 @@ evas_object_release(Evas_Object *obj, int clean_layer)
{
if (!obj->in_layer) return;
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
+ obj->layer->usage--;
if (clean_layer)
{
- if (!obj->layer->objects)
+ if (obj->layer->usage <= 0)
{
evas_layer_del(obj->layer);
evas_layer_free(obj->layer);