From bdbfa158f17dc00aadd20cfad2dbb2a04208dc98 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Thu, 14 Jul 2016 11:11:59 +0900 Subject: [PATCH] Fix reset sync issue Change-Id: Icdc7244cbc49a7ab52cb1ecdebb289f8b86bc1b5 --- ism/src/scim_helper.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ism/src/scim_helper.cpp b/ism/src/scim_helper.cpp index d9a1753..6cc0b6d 100644 --- a/ism/src/scim_helper.cpp +++ b/ism/src/scim_helper.cpp @@ -2014,7 +2014,19 @@ void HelperAgent::get_surrounding_text (int maxlen_before, int maxlen_after, String &text, int &cursor) { LOGD (""); - +#ifdef _TV + if (m_impl->socket_active.is_connected () && (m_impl->need_update_surrounding_text == 0)) { + m_impl->send.clear (); + m_impl->send.put_command (SCIM_TRANS_CMD_REQUEST); + m_impl->send.put_data (m_impl->magic_active); + m_impl->send.put_command (SCIM_TRANS_CMD_GET_SURROUNDING_TEXT); + m_impl->send.put_data (""); + m_impl->send.put_data (maxlen_before); + m_impl->send.put_data (maxlen_after); + m_impl->send.write_to_socket (m_impl->socket_active, m_impl->magic_active); + } + m_impl->need_update_surrounding_text++; +#else if (!m_impl->socket_active.is_connected ()) return; @@ -2047,6 +2059,7 @@ HelperAgent::get_surrounding_text (int maxlen_before, int maxlen_after, String & free (m_impl->surrounding_text); m_impl->surrounding_text = NULL; } +#endif } /** -- 2.7.4