From b4097611d71ad83990c064e1458a08359e783307 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 17 Jan 2017 14:03:20 +0900 Subject: [PATCH] Check if preedit string is empty before sending cursor_pos Currently we are not sending cursor_pos if we have preedit string, but since the routine only checks whether the preedit_text is NULL, so if the preedit_string is empty "" string, the ISE / IMEngine will not get cursor_pos information properly. Thus added 'strlen()' condition at the NULL checking 'if()' statement. Change-Id: Ia2444d59f736b3474da02ca56bf55b0c8c1f53a3 --- ism/extras/wayland_immodule/wayland_imcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 7bf4048..0b8529b 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -2573,7 +2573,7 @@ wayland_im_context_cursor_position_set (Ecore_IMF_Context *ctx, set_autocapital (ctx); - if (!imcontext->preedit_text) + if (!imcontext->preedit_text || strlen(imcontext->preedit_text) == 0) wl_text_input_set_cursor_position (imcontext->text_input, cursor_pos); } } -- 2.7.4