Acquire language locale string from ISE 64/165864/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 4 Jan 2018 10:35:49 +0000 (19:35 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 4 Jan 2018 10:41:40 +0000 (10:41 +0000)
Change-Id: I4e6d60997631a7aa345f0f97b711953ef4fd5f9b

ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp
ism/modules/panelagent/wayland/isf_wsc_control_ui.h
ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 83c3a5c..b64ace9 100644 (file)
@@ -316,3 +316,8 @@ void isf_wsc_context_input_hint_set (WSCContextISF *ctx, Ecore_IMF_Input_Hints i
     SECURE_LOGD("input hint : %d\n", input_hint);
     _isf_wsc_context_input_hint_set (_get_context_id(ctx), input_hint);
 }
+
+void isf_wsc_context_input_panel_language_locale_get (WSCContextISF *ctx, char **locale)
+{
+    _isf_wsc_context_input_panel_language_locale_get (_get_context_id(ctx), locale);
+}
\ No newline at end of file
index 0df5bfe..472b269 100644 (file)
@@ -59,6 +59,7 @@ extern "C"
     void isf_wsc_context_input_panel_finalize_content (WSCContextISF *ctx, const char *text, int cursor_pos);
     void isf_wsc_context_input_panel_prediction_hint_data_set (WSCContextISF *ctx, const char *key, const char *value);
     void isf_wsc_context_input_hint_set (WSCContextISF *ctx, Ecore_IMF_Input_Hints input_hint);
+    void isf_wsc_context_input_panel_language_locale_get (WSCContextISF *ctx, char **locale);
 
 #ifdef __cplusplus
 }
index 8138a6f..454fdfa 100644 (file)
@@ -3013,6 +3013,14 @@ public:
         if (!_focused_ic || !_focused_ic->im_ctx)
             return;
 
+        if (type == ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT) {
+            WSCContextISF* ic = find_ic (context);
+            if (ic) {
+                isf_wsc_context_input_panel_language_locale_get (_focused_ic, &(ic->language));
+                if (ic->language)
+                    wl_input_method_context_language (_focused_ic->im_ctx, _focused_ic->serial, ic->language);
+            }
+        }
         wl_input_method_context_input_panel_event (_focused_ic->im_ctx, _focused_ic->serial, type, value);
     }