ecore_imf/wayland: Fix bug language changed event is always called

This commit is contained in:
Jihoon Kim 2016-04-18 14:51:46 +09:00
parent b7d882515d
commit 8c1776d177
1 changed files with 10 additions and 6 deletions

View File

@ -685,18 +685,22 @@ text_input_language(void *data,
if (imcontext->language)
{
free(imcontext->language);
if (strcmp(imcontext->language, language) != 0)
changed = EINA_TRUE;
{
changed = EINA_TRUE;
free(imcontext->language);
}
}
else
changed = EINA_TRUE;
imcontext->language = strdup(language);
if (changed)
{
imcontext->language = strdup(language);
if (imcontext->ctx && changed)
ecore_imf_context_input_panel_event_callback_call(imcontext->ctx, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, 0);
if (imcontext->ctx)
ecore_imf_context_input_panel_event_callback_call(imcontext->ctx, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, 0);
}
}
static void