Fix Remote Input bug in browser address text entry 72/117172/2
authorSungmin Kwak <sungmin.kwak@samsung.com>
Fri, 3 Mar 2017 05:45:51 +0000 (14:45 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 6 Mar 2017 10:12:25 +0000 (02:12 -0800)
The values of cursor_pos and surrounding_text are not correct.
It's better to delete the surrounding text with maximum offset and length.

Change-Id: I85a233daeca6514819ebbcf384550e4cd381f725

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index fa1a4a1..3291973 100644 (file)
@@ -2429,7 +2429,7 @@ panel_slot_commit_string (int context, const WideString &wstr, bool remote_mode)
             check_input_resource (ic, INPUT_RESOURCE_REMOTE);
 
             if (ic->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_URL)
-                wsc_context_delete_surrounding (ic, -ic->impl->cursor_pos, ic->impl->surrounding_text.length ());
+                wsc_context_delete_surrounding (ic, INT_MIN/2, INT_MAX);
 
             wsc_context_commit_string (ic, utf8_wcstombs (wstr).c_str ());
             ic->impl->need_commit_preedit = false;
@@ -2508,7 +2508,7 @@ panel_slot_update_preedit_string (int context, const WideString str, const WideS
                     ic->impl->preedit_caret    = str.length ();
 
                 if (ic->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_URL)
-                    wsc_context_delete_surrounding (ic, -ic->impl->cursor_pos, ic->impl->surrounding_text.length ());
+                    wsc_context_delete_surrounding (ic, INT_MIN/2, INT_MAX);
 
                 wsc_context_send_preedit_string (ic);
             } else {