Fix issue mobile IME does not show in Remote Input 62/300062/1
authorInhong Han <inhong1.han@samsung.com>
Mon, 16 Oct 2023 08:10:09 +0000 (17:10 +0900)
committerInhong Han <inhong1.han@samsung.com>
Mon, 16 Oct 2023 08:10:09 +0000 (17:10 +0900)
Change-Id: I7f5d93b7d4dd4049996b9b830e185dc0198da979

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index d04ed6e..cb8ca4b 100644 (file)
@@ -942,7 +942,7 @@ _wsc_im_show_input_panel (void *data, struct zwp_input_method_v1 *input_method,
     wsc->wsc_ctx->input_panel_shown_once = EINA_TRUE;
 
     if (_TV)
-        isf_wsc_context_update_remote_surrounding_text (wsc->wsc_ctx, wsc->wsc_ctx->surrounding_text, wsc->wsc_ctx->surrounding_cursor);
+        isf_wsc_context_update_remote_surrounding_text (wsc->wsc_ctx, wsc->wsc_ctx->surrounding_text ? wsc->wsc_ctx->surrounding_text : "", wsc->wsc_ctx->surrounding_cursor);
 }
 
 static void
@@ -1633,6 +1633,7 @@ isf_wsc_context_update_remote_surrounding_text (WSCContextISF* wsc_ctx, const ch
 
     WSCContextISF *context_scim = wsc_ctx;
 
+    SECURE_LOGD("text : \"%s\", cursor : %d", text, cursor);
     if (!context_scim || !context_scim->impl || !text)
         return;
 
@@ -1641,12 +1642,12 @@ isf_wsc_context_update_remote_surrounding_text (WSCContextISF* wsc_ctx, const ch
         return;
 
     if (!context_scim->impl->init_remote_surrounding_text || strcmp (conv_text, text) != 0 || context_scim->impl->cursor_pos != cursor) {
-        SECURE_LOGD("remote surrounding text : \"%s\"", text);
         context_scim->impl->surrounding_text = utf8_mbstowcs (String (text));
         context_scim->impl->cursor_pos = cursor;
 
         if (_TV) {
             if (context_scim->input_panel_shown_once && context_scim->impl->input_resource != INPUT_RESOURCE_REMOTE) {
+                SECURE_LOGD("remote surrounding text : \"%s\"", text);
                 context_scim->impl->init_remote_surrounding_text = true;
                 if (context_scim->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD) {
                     g_info_manager->remoteinput_callback_surrounding_text (String (""), 0);