summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/eo_preload.c44
1 files changed, 35 insertions, 9 deletions
diff --git a/src/lib/eo_preload.c b/src/lib/eo_preload.c
index 151f001..4ab61da 100644
--- a/src/lib/eo_preload.c
+++ b/src/lib/eo_preload.c
@@ -524,17 +524,25 @@ _decorate_update(Evas_Object *obj)
524} 524}
525 525
526Ecore_Idler *g_idler = NULL; 526Ecore_Idler *g_idler = NULL;
527Eina_Bool g_no_idler = EINA_FALSE;
527 528
528static Eina_Bool 529static void
529_decorate_entry(void *data) 530_decorate_entry(Evas_Object *obj)
530{ 531{
531 Evas_Object *obj = data;
532 printf("Idler\n");
533 Debug_Decorate *dec = _decorate_update(obj); 532 Debug_Decorate *dec = _decorate_update(obj);
534 Evas_Object *tb = elm_entry_textblock_get(obj); 533 Evas_Object *tb = elm_entry_textblock_get(obj);
535 _textblock_rects_populate(tb, dec); 534 _textblock_rects_populate(tb, dec);
536 g_idler = NULL; 535}
537 536
537static Eina_Bool
538_decorate_entry_idler(void *data)
539{
540 Evas_Object *obj = data;
541 printf("Idler\n");
542
543 _decorate_entry(obj);
544
545 g_idler = NULL;
538 return ECORE_CALLBACK_CANCEL; 546 return ECORE_CALLBACK_CANCEL;
539} 547}
540 548
@@ -542,12 +550,19 @@ static Eina_Bool
542_on_entry_changed(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 550_on_entry_changed(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
543{ 551{
544 printf("Changed\n"); 552 printf("Changed\n");
545 if (g_idler) 553 if (g_no_idler)
546 { 554 {
547 ecore_idler_del(g_idler); 555 _decorate_entry(obj);
548 g_idler = NULL; 556 }
557 else
558 {
559 if (g_idler)
560 {
561 ecore_idler_del(g_idler);
562 g_idler = NULL;
563 }
564 g_idler = ecore_idler_add(_decorate_entry_idler, obj);
549 } 565 }
550 g_idler = ecore_idler_add(_decorate_entry, obj);
551 566
552 return EINA_TRUE; 567 return EINA_TRUE;
553} 568}
@@ -631,12 +646,23 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo
631 } 646 }
632 return ret; 647 return ret;
633} 648}
649
650static void
651_init_env()
652{
653 if (getenv("EDBG_NO_IDLER"))
654 {
655 g_no_idler = EINA_TRUE;
656 }
657}
658
634EAPI int 659EAPI int
635elm_init(int argc, char **argv) 660elm_init(int argc, char **argv)
636{ 661{
637 int ret; 662 int ret;
638 int (*f)(int argc, char **argv) = dlsym(RTLD_NEXT, __func__); 663 int (*f)(int argc, char **argv) = dlsym(RTLD_NEXT, __func__);
639 _init_colors(); 664 _init_colors();
665 _init_env();
640 ret = f(argc, argv); 666 ret = f(argc, argv);
641 return ret; 667 return ret;
642} 668}