edje: told you old man ! broadcasting message to all groups was a bad idea.

This patch try to prevent the broadcasting of targeted message. This should minimize
the problem generated on edje sub GROUP that didn't expect to see that much message
coming to them. It just a minimization of the problem, as message that don't target
explicitly a part are still propagated and can still break your edje usage from 1.0
to 1.1 version.


SVN revision: 67830
This commit is contained in:
Cedric BAIL 2012-02-10 16:49:58 +00:00
parent ef1e91430f
commit d5cbba52ef
2 changed files with 12 additions and 1 deletions

View File

@ -329,3 +329,7 @@
on separate part.
* Fix bug with filter preventing any action to be triggered.
2012-02-10 Cedric Bail
* Prevent propagation of signal, when there is a matching target with edje GROUP.

View File

@ -873,6 +873,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
{
Edje_Message_Signal emsg;
const char *sep;
Eina_Bool broadcast = EINA_TRUE;
if (ed->delete_me) return;
@ -958,6 +959,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
if (!ed2) goto end;
_edje_emit(ed2, newsig, src);
broadcast = EINA_FALSE;
break;
case EDJE_PART_TYPE_EXTERNAL:
@ -976,6 +978,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
if (!ed2) goto end;
_edje_emit(ed2, newsig, src);
}
broadcast = EINA_FALSE;
break ;
case EDJE_PART_TYPE_BOX:
@ -988,6 +991,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
ed2 = _edje_fetch(child);
if (!ed2) goto end;
_edje_emit(ed2, newsig, src);
broadcast = EINA_FALSE;
}
break ;
@ -1012,7 +1016,10 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
emsg.data = NULL;
}
/* new sends code */
edje_object_message_send(ed->obj, EDJE_MESSAGE_SIGNAL, 0, &emsg);
if (broadcast)
edje_object_message_send(ed->obj, EDJE_MESSAGE_SIGNAL, 0, &emsg);
else
_edje_message_send(ed, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg);
/* old send code - use api now
_edje_message_send(ed, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg);
EINA_LIST_FOREACH(ed->subobjs, l, obj)