forked from enlightenment/efl
ecore_imf/wayland: notify language changed
This commit is contained in:
parent
7564d49a83
commit
b1336a27c1
|
@ -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);
|
||||
|
||||
imcontext->language = strdup(language ? language : "");
|
||||
if (strcmp(imcontext->language, language) != 0)
|
||||
changed = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
changed = EINA_TRUE;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue