hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=3cfeb5c54b571a832b237719cd45469eb9669ed6

commit 3cfeb5c54b571a832b237719cd45469eb9669ed6
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Aug 14 23:33:20 2014 +0900

    auto_comp: reset tooltip at better proper position.
    
    it's better to reset tooltip content callback when it's going off.
---
 src/bin/auto_comp.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/bin/auto_comp.c b/src/bin/auto_comp.c
index add1040..81a4eb7 100644
--- a/src/bin/auto_comp.c
+++ b/src/bin/auto_comp.c
@@ -119,7 +119,14 @@ init_thread_cancel_cb(void *data, Ecore_Thread *thread 
EINA_UNUSED)
 static void
 entry_anchor_off(autocomp_data *ad)
 {
-   if (ad->anchor_visible) elm_object_tooltip_hide(ad->anchor);
+   if (ad->anchor_visible)
+     {
+        elm_object_tooltip_hide(ad->anchor);
+        /* Reset content_cb to have guarantee the callback call. If anchor is
+           changed faster than tooltip hide, the callback won't be called
+           since tooltip regards the content callback is same with before. */
+        elm_object_tooltip_content_cb_set(ad->anchor, NULL, NULL, NULL);
+     }
    ad->anchor_visible = EINA_FALSE;
    ad->compset_list = eina_list_free(ad->compset_list);
 }
@@ -349,10 +356,6 @@ candidate_list_show(autocomp_data *ad)
         if ((cy + y) > (h / 2)) tooltip_orient = ELM_TOOLTIP_ORIENT_TOP;
 
         //Tooltip set
-        /* Reset content_cb to have guarantee the callback call. If anchor is
-           changed faster than tooltip hide, the callback won't be called
-           since tooltip regards the content callback is same with before. */
-        elm_object_tooltip_content_cb_set(ad->anchor, NULL, NULL, NULL);
         elm_object_tooltip_content_cb_set(ad->anchor,
                                           entry_tooltip_content_cb, ad, NULL);
         elm_object_tooltip_orient_set(ad->anchor, tooltip_orient);

-- 


Reply via email to