From: raster Date: Wed, 9 Mar 2011 06:16:46 +0000 (+0000) Subject: fix -> call hide BEFORE del. X-Git-Tag: submit/trunk/20120815.174732~1841 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c92ae9c9a97933511969a743c33561475d40eb27;p=profile%2Fivi%2Fevas.git fix -> call hide BEFORE del. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@57613 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index 437395c..d1b33c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -146,3 +146,8 @@ as they have the same base name, but different prototypes * Add evas_object_ref() and evas_object_unref() to defer deletion of objects until all references are removed + +2011-03-09 Carsten Haitzler (The Rasterman) + + * Fix bug with evas_object_del() calling DEL callback BEFORE + the HIDE one. diff --git a/src/lib/canvas/evas_object_main.c b/src/lib/canvas/evas_object_main.c index 4b949e6..c7a58da 100644 --- a/src/lib/canvas/evas_object_main.c +++ b/src/lib/canvas/evas_object_main.c @@ -430,8 +430,16 @@ evas_object_del(Evas_Object *obj) evas_common_frameq_flush(); #endif + evas_object_hide(obj); + if (obj->focused) + { + obj->focused = 0; + obj->layer->evas->focused = NULL; + _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + _evas_post_event_callback_call(obj->layer->evas); + } _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL); _evas_post_event_callback_call(obj->layer->evas); if (obj->name) evas_object_name_set(obj, NULL); @@ -440,18 +448,9 @@ evas_object_del(Evas_Object *obj) evas_object_free(obj, 1); return; } - if (obj->focused) - { - obj->focused = 0; - obj->layer->evas->focused = NULL; - _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); - _evas_post_event_callback_call(obj->layer->evas); - } obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; obj->mouse_grabbed = 0; obj->mouse_in = 0; - evas_object_hide(obj); evas_object_grabs_cleanup(obj); while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data);