Set keyboard mode
authorSangYong Park <sy302.park@samsung.com>
Mon, 10 Jun 2013 04:24:42 +0000 (13:24 +0900)
committerSangYong Park <sy302.park@samsung.com>
Thu, 4 Jul 2013 04:06:53 +0000 (13:06 +0900)
[Title] Set keyboard mode
[Issue#] P130607-4045
[Problem] Layout did not changed by conformant
[Cause] Keyboard mode was not changed
[Solution] Change keyboard mode when keypad was show/hide.

Change-Id: I9d8c6eab25952eb823efb057fdffffa2b57832f3

Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp
Source/WebKit2/UIProcess/efl/InputMethodContextEfl.h

index e5db346..4a0a7af 100755 (executable)
@@ -496,6 +496,8 @@ void InputMethodContextEfl::onFocusIn()
 
     ecore_imf_context_focus_in(m_context.get());
     ecore_imf_context_input_panel_show(m_context.get());
+
+    setKeyboardMode(true);
 }
 
 void InputMethodContextEfl::onFocusOut()
@@ -512,6 +514,8 @@ void InputMethodContextEfl::onFocusOut()
 
     ecore_imf_context_input_panel_hide(m_context.get());
     ecore_imf_context_focus_out(m_context.get());
+
+    setKeyboardMode(false);
 }
 
 void InputMethodContextEfl::revertIMFContext()
@@ -619,6 +623,8 @@ void InputMethodContextEfl::showIMFContext(const EditorState& editor)
     ewk_view_focused_node_adjust(m_viewImpl->view(), EINA_TRUE);
 
     m_focused = true;
+
+    setKeyboardMode(true);
 }
 
 void InputMethodContextEfl::hideIMFContext()
@@ -647,6 +653,8 @@ void InputMethodContextEfl::hideIMFContext()
         ecore_imf_context_focus_out(m_context.get());
     }
 
+    setKeyboardMode(false);
+
     revertIMFContext();
 }
 
@@ -682,6 +690,19 @@ void InputMethodContextEfl::removeIMFContext(uintptr_t contextID)
     takeContext(contextID);
 }
 
-#endif
+void InputMethodContextEfl::setKeyboardMode(bool isOn)
+{
+    Evas_Object* parent = elm_object_parent_widget_get(m_viewImpl->view());
+    while (parent) {
+        const char* type = elm_object_widget_type_get(parent);
+        if (type && !strcmp(type, "elm_win")) {
+            elm_win_keyboard_mode_set(parent, isOn ? ELM_WIN_KEYBOARD_ON : ELM_WIN_KEYBOARD_OFF);
+            return;
+        }
+
+        parent = elm_object_parent_widget_get(parent);
+    }
+}
+#endif // #if ENABLE(TIZEN_ISF_PORT)
 
 }
index f69ca99..9449278 100755 (executable)
@@ -91,6 +91,8 @@ private:
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
     void showInputPicker(const EditorState&);
 #endif
+
+    void setKeyboardMode(bool);
 #endif
 
     EwkViewImpl* m_viewImpl;