Fix IME doesn't hide in case idle window appears 74/50174/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 22 Oct 2015 13:43:39 +0000 (22:43 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 26 Oct 2015 12:40:01 +0000 (21:40 +0900)
Change-Id: Ie5b46db5bce8b3acfc9a0f56f660f534f556d5e7

ism/configs/global
ism/extras/efl_immodule/isf_imf_control_ui.cpp
ism/src/scim_config_path.h

index 7890ca7116a9d4d14886116ac6795bd505f0d1d5..e458f7effee983073507d17ed706d9c3b92f0c85 100755 (executable)
@@ -17,3 +17,4 @@
 /HideIseBasedOnFocus = false
 /SupportHWKeyboardMode = true
 /DefaultKbdModeChangerProgram = org.tizen.isf-kbd-mode-changer
+/LockScreenClassName = LOCK_SCREEN, hub-idlescreen
index f8ef33f81849262cb580fe6a77b497f0c7b4f23a..18372c806d472bbfde18e5a279f2a10aa0842dfa 100644 (file)
@@ -64,6 +64,8 @@ static bool               _support_hw_keyboard_mode = false;
 
 extern void scim_initialize (void);
 
+static std::vector <String> 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);
index fd30811a0580f68c684e13ca46c5e9800db3691d..d5032274f5414062fe3033e6ebedf44ddd1af4cb 100644 (file)
@@ -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"