Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_layer.c evas_object_smart.c
Log Message:
i think this will fix the layer thing nathan found
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_layer.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- evas_layer.c 27 Oct 2005 10:33:47 -0000 1.14
+++ evas_layer.c 8 Nov 2005 11:59:21 -0000 1.15
@@ -15,6 +15,7 @@
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 @@
{
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);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_smart.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_object_smart.c 27 Oct 2005 02:44:36 -0000 1.16
+++ evas_object_smart.c 8 Nov 2005 11:59:21 -0000 1.17
@@ -139,6 +139,7 @@
evas_object_release(obj, 1);
obj->layer = smart_obj->layer;
obj->cur.layer = obj->layer->layer;
+ obj->layer->usage++;
obj->smart.parent = smart_obj;
smart_obj->smart.contained =
evas_object_list_append(smart_obj->smart.contained, obj);
evas_object_smart_member_cache_invalidate(obj);
@@ -163,6 +164,7 @@
obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
obj->smart.parent = NULL;
evas_object_smart_member_cache_invalidate(obj);
+ obj->layer->usage--;
obj->cur.layer = obj->layer->layer;
evas_object_inject(obj, obj->layer->evas);
obj->restack = 1;
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs