Modified to call the remote_surrounding_text_cb when changing preedit text 66/268666/1
authorInHong Han <inhong1.han@samsung.com>
Tue, 28 Dec 2021 07:49:03 +0000 (16:49 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 29 Dec 2021 06:53:36 +0000 (06:53 +0000)
Change-Id: Ib08cbb3caee6370823f79cf9856ae84360a40a16

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 238a6d7..58ab235 100644 (file)
@@ -442,9 +442,6 @@ _wsc_im_ctx_cursor_position (void *data, struct wl_input_method_context *im_ctx,
     wsc_ctx->surrounding_cursor = cursor_pos;
     LOGD ("wsc_ctx->surrounding_cursor = %d", wsc_ctx->surrounding_cursor);
     g_info_manager->socket_update_cursor_position (cursor_pos);
-
-    if (_TV)
-        remote_surrounding_get (wsc_ctx);
 }
 
 static void
@@ -1886,6 +1883,9 @@ wsc_commit_preedit (WSCContextISF* wsc_ctx)
         free (wsc_ctx->preedit_str);
 
     wsc_ctx->preedit_str = strdup ("");
+
+    if (_TV)
+        remote_surrounding_get (wsc_ctx);
 }
 
 static void
@@ -2018,6 +2018,9 @@ wsc_send_preedit (WSCContextISF* wsc_ctx, int32_t cursor)
                                             wsc_ctx->serial,
                                             wsc_ctx->preedit_str,
                                             utf8_wcstombs (wsc_ctx->impl->commit_string).c_str ());
+
+    if (_TV)
+        remote_surrounding_get (wsc_ctx);
 }
 
 bool wsc_context_surrounding_get (WSCContextISF *wsc_ctx, char **text, int *cursor_pos)