fix -> call hide BEFORE del.

SVN revision: 57613
This commit is contained in:
Carsten Haitzler 2011-03-09 06:16:46 +00:00
parent 36a0d2587b
commit 51b3f6c969
2 changed files with 15 additions and 11 deletions

View File

@ -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.

View File

@ -430,16 +430,7 @@ evas_object_del(Evas_Object *obj)
evas_common_frameq_flush();
#endif
_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);
if (!obj->layer)
{
evas_object_free(obj, 1);
return;
}
evas_object_hide(obj);
if (obj->focused)
{
obj->focused = 0;
@ -448,10 +439,18 @@ evas_object_del(Evas_Object *obj)
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);
if (!obj->layer)
{
evas_object_free(obj, 1);
return;
}
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);