jihoon pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b1336a27c1a5de3e6f629ff47552deec5fdf172a

commit b1336a27c1a5de3e6f629ff47552deec5fdf172a
Author: Jihoon Kim <jihoon48....@samsung.com>
Date:   Thu Feb 4 11:58:03 2016 +0900

    ecore_imf/wayland: notify language changed
---
 src/modules/ecore_imf/wayland/wayland_imcontext.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c 
b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index dd36f0f..d58606e 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -598,11 +598,24 @@ text_input_language(void                 *data,
                     const char           *language)
 {
     WaylandIMContext *imcontext = (WaylandIMContext *)data;
+    Eina_Bool changed = EINA_FALSE;
+
+    if (!imcontext || !language) return;
 
     if (imcontext->language)
-      free(imcontext->language);
+      {
+         free(imcontext->language);
+
+         if (strcmp(imcontext->language, language) != 0)
+           changed = EINA_TRUE;
+      }
+    else
+      changed = EINA_TRUE;
+
+    imcontext->language = strdup(language);
 
-    imcontext->language = strdup(language ? language : "");
+    if (imcontext->ctx && changed)
+      ecore_imf_context_input_panel_event_callback_call(imcontext->ctx, 
ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, 0);
 }
 
 static void

-- 


Reply via email to