From 0555911cfa1c99ab17b41335b4bf3192527ad5a8 Mon Sep 17 00:00:00 2001 From: Sungmin Kwak Date: Wed, 13 Sep 2017 14:07:23 +0900 Subject: [PATCH] Relaunch IME if the connection is not properly made Relaunch it when ISF tries to show IME Change-Id: I2b125eb6a5d70e528d90b7e2b650f10eea92ad4b (cherry picked from commit 8e509a65e21b47a2ad91ca564909fb31693a9eba) --- ism/extras/efl_panel/isf_panel_efl.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp index b14da48..82cb0d5 100644 --- a/ism/extras/efl_panel/isf_panel_efl.cpp +++ b/ism/extras/efl_panel/isf_panel_efl.cpp @@ -6117,10 +6117,9 @@ static void slot_get_ise_state (int &state) static void slot_start_default_ise (void) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; + String uuid = _config->read (SCIM_CONFIG_DEFAULT_HELPER_ISE, String ("")); if ((_info_manager->get_current_toolbar_mode () == TOOLBAR_HELPER_MODE)) { if (_launch_ise_on_request && !_soft_keyboard_launched) { - String uuid = _config->read (SCIM_CONFIG_DEFAULT_HELPER_ISE, String ("")); - LOGD ("Start helper (%s)\n", uuid.c_str ()); set_keyboard_engine (String (SCIM_COMPOSE_KEY_FACTORY_UUID)); @@ -6129,6 +6128,16 @@ static void slot_start_default_ise (void) else LOGW ("Failed to start helper (%s)\n", uuid.c_str ()); } + else if (_soft_keyboard_launched) /* In case IME is launched but can't show it because of the connection failure. */ + { + LOGD ("Restart helper (%s)\n", uuid.c_str ()); + + _info_manager->stop_helper (uuid); + if (_info_manager->start_helper (uuid)) + _soft_keyboard_launched = true; + else + _soft_keyboard_launched = false; + } } } -- 2.7.4