From 4ad4fadb35464c7bb3a4bb4ef7954b2ddabb9f0c Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 27 May 2011 10:46:51 +0000 Subject: [PATCH] From: Jihoon Kim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When elm_entry_entry_set() is called, the preedit text in the entry should be cleared. ATM, it doesn’t works so. This patch will resolve this problem. When ecore_imf_context_reset() is called, the preedit text in the immodule will be committed by calling ‘ecore_imf_context_commit_event_add()’. ecore_imf_context_commit_event_add puts the event in ecore event queue, so it will be processed in the idle state of ecore loop. According to this mechanism, commit text is inserted later, so I use ‘ecore_main_loop_iterate();’ for inserting the commit string instantly. SVN revision: 59732 --- legacy/edje/src/lib/edje_entry.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c index 39d3b64ddb..0182da7d19 100644 --- a/legacy/edje/src/lib/edje_entry.c +++ b/legacy/edje/src/lib/edje_entry.c @@ -2035,6 +2035,13 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text) Entry *en = rp->entry_data; if (!en) return; +#ifdef HAVE_ECORE_IMF + if ((en->have_preedit) && (en->imf_context)) + { + ecore_imf_context_reset(en->imf_context); + ecore_main_loop_iterate(); + } +#endif // set text as markup _sel_clear(en->cursor, rp->object, en); evas_object_textblock_text_markup_set(rp->object, text);