aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 11:58:03 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 11:58:03 +0900
commitb1336a27c1a5de3e6f629ff47552deec5fdf172a (patch)
tree94cdf52428e3174dc8e0a543573ce3bf241fc9bd
parentecore_imf/wayland: Add support to get input panel language locale (diff)
downloadefl-b1336a27c1a5de3e6f629ff47552deec5fdf172a.tar.gz
ecore_imf/wayland: notify language changed
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c17
1 files 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 dd36f0fbb8..d58606eaf4 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