From: InHong Han Date: Mon, 10 Aug 2020 10:34:50 +0000 (+0900) Subject: Add set_engine_loader_flag() interface X-Git-Tag: accepted/tizen/5.5/unified/20200811.021528~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F240662%2F1;p=platform%2Fcore%2Fuifw%2Fisf.git Add set_engine_loader_flag() interface Change-Id: Ied41e8ea4e26d5301b08ca8dd57dcaeb39c0ccd1 --- diff --git a/ism/src/scim_helper.cpp b/ism/src/scim_helper.cpp index c125329..2cffbd4 100644 --- a/ism/src/scim_helper.cpp +++ b/ism/src/scim_helper.cpp @@ -170,6 +170,7 @@ public: bool ise_focus_flag; char* finalized_text; uint32 finalized_cursor_pos; + bool engine_loader_flag; HelperAgentSignalVoid signal_exit; HelperAgentSignalVoid signal_attach_input_context; @@ -245,7 +246,7 @@ public: surrounding_text (NULL), selection_text (NULL), cursor_pos (0), need_update_surrounding_text (0), need_update_selection_text (0), layout (0), ise_show_flag (false), need_update_entry_metadata (true), ise_focus_flag (false), - finalized_text(NULL), finalized_cursor_pos(0) { + finalized_text(NULL), finalized_cursor_pos(0), engine_loader_flag(false) { } ~HelperAgentImpl () { @@ -591,7 +592,7 @@ public: } } private: - HelperAgentImpl () : magic (0), magic_active (0), timeout (-1), focused_ic ((uint32) -1), thiz (NULL), surrounding_text (NULL), selection_text (NULL), cursor_pos (0), need_update_surrounding_text (0), need_update_selection_text (0), layout (0), ise_show_flag (false), need_update_entry_metadata (true), ise_focus_flag (false), finalized_text (NULL), finalized_cursor_pos (0) { } + HelperAgentImpl () : magic (0), magic_active (0), timeout (-1), focused_ic ((uint32) -1), thiz (NULL), surrounding_text (NULL), selection_text (NULL), cursor_pos (0), need_update_surrounding_text (0), need_update_selection_text (0), layout (0), ise_show_flag (false), need_update_entry_metadata (true), ise_focus_flag (false), finalized_text (NULL), finalized_cursor_pos (0), engine_loader_flag (false) { } }; static MessageQueue message_queue; @@ -1170,19 +1171,18 @@ HelperAgent::handle_message (MessageItem *message) m_impl->signal_process_key_event(this, subclass->get_key_ref(), ret); m_impl->signal_process_key_event_with_keycode(this, subclass->get_key_ref(), keycode_ret, subclass->get_keycode_ref()); if (ret == 0 && keycode_ret == 0) { - if (!m_impl->si.null ()) { - if (!(subclass->get_key_ref().get_key_string().compare("KeyRelease+XF86Back") == 0 || - subclass->get_key_ref().get_key_string().compare("XF86Back") == 0)) { - ret = m_impl->si->process_key_event (subclass->get_key_ref()); - SECURE_LOGD ("imengine(%s) process key %d return %d", m_impl->si->get_factory_uuid().c_str(), - subclass->get_key_ref().code, ret); - } - } else { - if (!(subclass->get_key_ref().get_key_string().compare("KeyRelease+XF86Back") == 0 || - subclass->get_key_ref().get_key_string().compare("XF86Back") == 0)) { - m_impl->signal_process_key_event_with_imengine(this, subclass->get_key_ref(), ret); - SECURE_LOGD ("imengine process key %d return %d", subclass->get_key_ref().code, ret); - } + if (!(subclass->get_key_ref().get_key_string().compare("KeyRelease+XF86Back") == 0 || + subclass->get_key_ref().get_key_string().compare("XF86Back") == 0)) { + if (m_impl->engine_loader_flag) { + m_impl->signal_process_key_event_with_imengine(this, subclass->get_key_ref(), ret); + SECURE_LOGD ("imengine process key %d return %d", subclass->get_key_ref().code, ret); + } else { + if (!m_impl->si.null ()) { + ret = m_impl->si->process_key_event (subclass->get_key_ref()); + SECURE_LOGD ("imengine(%s) process key %d return %d", m_impl->si->get_factory_uuid().c_str(), + subclass->get_key_ref().code, ret); + } + } } } if (ret != keycode_ret) @@ -2716,6 +2716,12 @@ HelperAgent::recapture_string (int ic, } } +void +HelperAgent::set_engine_loader_flag (bool flag) +{ + m_impl->engine_loader_flag = flag; +} + /** * @brief Connect a slot to Helper exit signal. * diff --git a/ism/src/scim_helper.h b/ism/src/scim_helper.h index 3473cff..df4e88d 100644 --- a/ism/src/scim_helper.h +++ b/ism/src/scim_helper.h @@ -776,6 +776,8 @@ public: const WideString &commit_str, const AttributeList &attrs) const; + void set_engine_loader_flag (bool flag); + public: /** * @brief Connect a slot to Helper exit signal.