#include "edje_private.h"
-static Ecore_Job *job = NULL;
-static Ecore_Timer *job_loss_timer = NULL;
+static int _injob = 0;
+static Ecore_Job *_job = NULL;
+static Ecore_Timer *_job_loss_timer = NULL;
static Eina_List *msgq = NULL;
static Eina_List *tmp_msgq = NULL;
static void
_edje_job(void *data __UNUSED__)
{
- if (job_loss_timer)
+ if (_job_loss_timer)
{
- ecore_timer_del(job_loss_timer);
- job_loss_timer = NULL;
+ ecore_timer_del(_job_loss_timer);
+ _job_loss_timer = NULL;
}
+ _job = NULL;
+ _injob++;
_edje_message_queue_process();
- job = NULL;
+ _injob--;
}
static int
_edje_job_loss_timer(void *data __UNUSED__)
{
- job_loss_timer = NULL;
- if (job) job = NULL;
+ _job_loss_timer = NULL;
+ if (!_job)
+ {
+ _job = ecore_job_add(_edje_job, NULL);
+ }
return 0;
}
_edje_message_shutdown(void)
{
_edje_message_queue_clear();
- if (job_loss_timer)
- ecore_timer_del(job_loss_timer);
- job = NULL;
- job_loss_timer = NULL;
+ if (_job_loss_timer)
+ {
+ ecore_timer_del(_job_loss_timer);
+ _job_loss_timer = NULL;
+ }
+ if (_job)
+ {
+ ecore_job_del(_job);
+ _job = NULL;
+ }
}
void
int i;
unsigned char *msg = NULL;
- if (!job)
- {
- job = ecore_job_add(_edje_job, NULL);
- if (job_loss_timer) ecore_timer_del(job_loss_timer);
- job_loss_timer = ecore_timer_add(0.05, _edje_job_loss_timer, NULL);
- }
em = _edje_message_new(ed, queue, type, id);
if (!em) return;
+ if (_job)
+ {
+ ecore_job_del(_job);
+ _job = NULL;
+ }
+ if (_injob > 0)
+ {
+ _job_loss_timer = ecore_timer_add(0.01, _edje_job_loss_timer, NULL);
+ }
+ else
+ {
+ if (!_job)
+ {
+ _job = ecore_job_add(_edje_job, NULL);
+ }
+ if (_job_loss_timer)
+ {
+ ecore_timer_del(_job_loss_timer);
+ _job_loss_timer = NULL;
+ }
+ }
switch (em->type)
{
case EDJE_MESSAGE_NONE:
Edje_Message_String *emsg2, *emsg3;
emsg2 = (Edje_Message_String *)emsg;
+
emsg3 = malloc(sizeof(Edje_Message_String));
emsg3->str = strdup(emsg2->str);
msg = (unsigned char *)emsg3;