summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-03-29 07:46:59 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-29 07:46:59 +0000
commit01994a641a234f44ddb8e9ad38a3a6566afeb167 (patch)
treecfadf81bd162c85153d0660dd25e5d0656902049 /legacy/elementary
parent2d2ed8d95df7653dc48f0402cd4ab238e7533ecd (diff)
use new ref_get func in object cleanup for windows.
SVN revision: 69723
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_win.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 84999913a2..364dffe3ae 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -616,7 +616,7 @@ static void
616_elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__) 616_elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__)
617{ 617{
618 Elm_Win *win = data; 618 Elm_Win *win = data;
619 Evas_Object *child; 619 Evas_Object *child, *child2 = NULL;
620 620
621 if (win->parent) 621 if (win->parent)
622 { 622 {
@@ -638,15 +638,36 @@ _elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_inf
638 if (win->shot.timer) ecore_timer_del(win->shot.timer); 638 if (win->shot.timer) ecore_timer_del(win->shot.timer);
639 evas_object_event_callback_del_full(win->win_obj, EVAS_CALLBACK_DEL, 639 evas_object_event_callback_del_full(win->win_obj, EVAS_CALLBACK_DEL,
640 _elm_win_obj_callback_del, win); 640 _elm_win_obj_callback_del, win);
641 while (((child = evas_object_bottom_get(win->evas))) && 641 child = evas_object_bottom_get(win->evas);
642 (child != obj)) 642 while (child)
643 { 643 {
644 evas_object_del(child); 644 /* if the object we see *IS* the window object (because we are
645 } 645 * faking a parent object inside the canvas), then skip it and
646 while (((child = evas_object_top_get(win->evas))) && 646 * go to the next one */
647 (child != obj)) 647 if (child == obj)
648 { 648 {
649 evas_object_del(child); 649 child = evas_object_above_get(child);
650 if (!child) break;
651 }
652 /* if we are using the next object above from the previous loop */
653 if (child == child2)
654 {
655 /* this object has refcounts from the previous loop */
656 child2 = evas_object_above_get(child);
657 if (child2) evas_object_ref(child2);
658 evas_object_del(child);
659 /* so unref from previous loop */
660 evas_object_unref(child);
661 child = child2;
662 }
663 else
664 {
665 /* just delete as normal (probably only first object */
666 child2 = evas_object_above_get(child);
667 if (child2) evas_object_ref(child2);
668 evas_object_del(child);
669 child = child2;
670 }
650 } 671 }
651#ifdef HAVE_ELEMENTARY_X 672#ifdef HAVE_ELEMENTARY_X
652 if (win->client_message_handler) 673 if (win->client_message_handler)