From 8be3011cef5ffd9bb2ca1e4897409af877474c1b Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 22 Oct 2015 22:43:39 +0900 Subject: [PATCH] Fix IME doesn't hide in case idle window appears Change-Id: Ie5b46db5bce8b3acfc9a0f56f660f534f556d5e7 --- ism/configs/global | 1 + ism/extras/efl_immodule/isf_imf_control_ui.cpp | 13 +++++++++++-- ism/src/scim_config_path.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ism/configs/global b/ism/configs/global index 7890ca7..e458f7e 100755 --- a/ism/configs/global +++ b/ism/configs/global @@ -17,3 +17,4 @@ /HideIseBasedOnFocus = false /SupportHWKeyboardMode = true /DefaultKbdModeChangerProgram = org.tizen.isf-kbd-mode-changer +/LockScreenClassName = LOCK_SCREEN, hub-idlescreen diff --git a/ism/extras/efl_immodule/isf_imf_control_ui.cpp b/ism/extras/efl_immodule/isf_imf_control_ui.cpp index f8ef33f..18372c8 100644 --- a/ism/extras/efl_immodule/isf_imf_control_ui.cpp +++ b/ism/extras/efl_immodule/isf_imf_control_ui.cpp @@ -64,6 +64,8 @@ static bool _support_hw_keyboard_mode = false; extern void scim_initialize (void); +static std::vector lock_screen_class_names; + static void _send_input_panel_hide_request (); Ecore_IMF_Context *get_using_ic (Ecore_IMF_Input_Panel_Event type, int value) { @@ -423,11 +425,16 @@ Eina_Bool check_focus_out_by_popup_win (Ecore_IMF_Context *ctx) LOGD ("client window : %#x, focus window : %#x\n", client_win, focus_win); if (client_win != focus_win) { + ret = EINA_TRUE; ecore_x_icccm_name_class_get (focus_win, NULL, &class_name); if (class_name) { - if (strncmp (class_name, "LOCK_SCREEN", 11) != 0) { - ret = EINA_TRUE; + LOGD ("window class name : %s\n", class_name); + for (unsigned int i = 0; i < lock_screen_class_names.size (); ++i) { + if (!strcmp (class_name, lock_screen_class_names [i].c_str ())) { + ret = EINA_FALSE; + break; + } } free (class_name); @@ -466,6 +473,8 @@ void isf_imf_input_panel_init (void) _prop_change_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, _prop_change, NULL); _support_hw_keyboard_mode = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE), _support_hw_keyboard_mode); + scim_split_string_list (lock_screen_class_names, scim_global_config_read (String (SCIM_GLOBAL_CONFIG_LOCK_SCREEN_CLASS_NAME), String ("")), ','); + if (_support_hw_keyboard_mode){ if (!prop_x_keyboard_input_detected) prop_x_keyboard_input_detected = ecore_x_atom_get (PROP_X_EXT_KEYBOARD_INPUT_DETECTED); diff --git a/ism/src/scim_config_path.h b/ism/src/scim_config_path.h index fd30811..d503227 100644 --- a/ism/src/scim_config_path.h +++ b/ism/src/scim_config_path.h @@ -91,6 +91,7 @@ namespace scim { #define SCIM_GLOBAL_CONFIG_HIDE_ISE_BASED_ON_FOCUS "/HideIseBasedOnFocus" #define SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE "/SupportHWKeyboardMode" #define SCIM_GLOBAL_CONFIG_DEFAULT_KBD_MODE_CHANGER_PROGRAM "/DefaultKbdModeChangerProgram" +#define SCIM_GLOBAL_CONFIG_LOCK_SCREEN_CLASS_NAME "/LockScreenClassName" #define ISF_CONFIG_HARDWARE_KEYBOARD_DETECT "/isf/hw_keyboard_detect" -- 2.7.4