edje: call edje_object_message_signal_process also on GROUP part Edje object.

SVN revision: 74916
This commit is contained in:
Cedric BAIL 2012-08-06 09:22:42 +00:00
parent 9d7c0f6d74
commit f31da4c907
5 changed files with 59 additions and 23 deletions

View File

@ -540,3 +540,7 @@
2012-07-29 Cedric Bail 2012-07-29 Cedric Bail
* Reduce potential reentrant issue when using edje_object_signal_emit. * Reduce potential reentrant issue when using edje_object_signal_emit.
2012-08-06 Cedric Bail
* Call edje_object_message_signal_process also on GROUP part Edje object.

View File

@ -29,6 +29,7 @@ Fixes:
* [entry] display preedit string even though there is no attribute * [entry] display preedit string even though there is no attribute
* Fix shutdown of Edje_Multisense. * Fix shutdown of Edje_Multisense.
* Reduce potential reentrant issue when using edje_object_signal_emit. * Reduce potential reentrant issue when using edje_object_signal_emit.
* Call edje_object_message_signal_process also on GROUP part Edje object.
Edje 1.2.0 Edje 1.2.0

View File

@ -2421,6 +2421,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
{ {
edje_object_update_hints_set(ep->swallowed_object, ep->param1.description->min.limit); edje_object_update_hints_set(ep->swallowed_object, ep->param1.description->min.limit);
} }
if (edje_object_update_hints_get(ep->swallowed_object))
{
Edje *ted;
ted = _edje_fetch(ep->swallowed_object);
_edje_recalc_do(ted);
}
} }
#ifdef EDJE_CALC_CACHE #ifdef EDJE_CALC_CACHE

View File

@ -48,37 +48,47 @@ edje_object_message_handler_set(Evas_Object *obj, Edje_Message_Handler_Cb func,
_edje_message_cb_set(ed, func, data); _edje_message_cb_set(ed, func, data);
} }
EAPI void EAPI void
edje_object_message_signal_process(Evas_Object *obj) edje_object_message_signal_process(Evas_Object *obj)
{ {
Eina_List *l, *ln, *tmpq = NULL; Eina_List *l, *ln, *tmpq = NULL;
Edje *ed; Edje *ed;
Edje *lookup_ed;
Eina_List *lg;
Edje_Message *em; Edje_Message *em;
Eina_List *groups = NULL;
int gotos = 0; int gotos = 0;
unsigned int i;
ed = _edje_fetch(obj); ed = _edje_fetch(obj);
if (!ed) return; if (!ed) return;
for (l = msgq; l; ) groups = eina_list_append(groups, ed);
for (i = 0; i < ed->table_parts_size; i++)
{ {
ln = l->next; Edje_Real_Part *rp;
em = l->data;
if (em->edje == ed) rp = ed->table_parts[i];
{ if (rp->part->type == EDJE_PART_TYPE_GROUP && rp->swallowed_object)
tmpq = eina_list_append(tmpq, em); groups = eina_list_append(groups,
msgq = eina_list_remove_list(msgq, l); _edje_fetch(rp->swallowed_object));
} }
l = ln;
EINA_LIST_FOREACH_SAFE(msgq, l, ln, em)
{
EINA_LIST_FOREACH(groups, lg, lookup_ed)
if (em->edje == lookup_ed)
{
tmpq = eina_list_append(tmpq, em);
msgq = eina_list_remove_list(msgq, l);
break;
}
} }
/* a temporary message queue */ /* a temporary message queue */
if (tmp_msgq) if (tmp_msgq)
{ {
while (tmpq) EINA_LIST_FREE(tmpq, em)
{ tmp_msgq = eina_list_append(tmp_msgq, em);
tmp_msgq = eina_list_append(tmp_msgq, tmpq->data);
tmpq = eina_list_remove_list(tmpq, tmpq);
}
} }
else else
{ {
@ -90,20 +100,23 @@ edje_object_message_signal_process(Evas_Object *obj)
again: again:
EINA_LIST_FOREACH_SAFE(tmp_msgq, l, ln, em) EINA_LIST_FOREACH_SAFE(tmp_msgq, l, ln, em)
{ {
if (em->edje != ed) continue; EINA_LIST_FOREACH(groups, lg, lookup_ed)
if (em->edje == lookup_ed)
break;
if (em->edje != lookup_ed) continue;
tmp_msgq = eina_list_remove_list(tmp_msgq, l); tmp_msgq = eina_list_remove_list(tmp_msgq, l);
if (!ed->delete_me) if (!lookup_ed->delete_me)
{ {
ed->processing_messages++; lookup_ed->processing_messages++;
_edje_message_process(em); _edje_message_process(em);
_edje_message_free(em); _edje_message_free(em);
ed->processing_messages--; lookup_ed->processing_messages--;
} }
else else
_edje_message_free(em); _edje_message_free(em);
if (ed->processing_messages == 0) if (lookup_ed->processing_messages == 0)
{ {
if (ed->delete_me) _edje_del(ed); if (lookup_ed->delete_me) _edje_del(lookup_ed);
} }
// if some child callback in _edje_message_process called // if some child callback in _edje_message_process called
// edje_object_message_signal_process() or // edje_object_message_signal_process() or
@ -133,7 +146,6 @@ end:
tmp_msgq_restart = 1; tmp_msgq_restart = 1;
} }
EAPI void EAPI void
edje_message_signal_process(void) edje_message_signal_process(void)
{ {

View File

@ -1149,6 +1149,10 @@ edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
evas_object_textblock_style_user_push(rp->object, ts); evas_object_textblock_style_user_push(rp->object, ts);
evas_textblock_style_free(ts); evas_textblock_style_free(ts);
ed->recalc_hints = 1; ed->recalc_hints = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
_edje_recalc(ed);
} }
EAPI void EAPI void
@ -1165,6 +1169,10 @@ edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
evas_object_textblock_style_user_pop(rp->object); evas_object_textblock_style_user_pop(rp->object);
ed->recalc_hints = 1; ed->recalc_hints = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
_edje_recalc(ed);
} }
EAPI const char * EAPI const char *
@ -4462,7 +4470,11 @@ edje_object_update_hints_set(Evas_Object *obj, Eina_Bool update)
if (ed->update_hints == !!update) return ; if (ed->update_hints == !!update) return ;
ed->update_hints = !!update; ed->update_hints = !!update;
if (update) ed->recalc_hints = 1; if (update)
{
ed->recalc_hints = 1;
_edje_recalc(ed);
}
} }
EAPI Eina_Bool EAPI Eina_Bool