Move the position to hide ClipboardWindow
authorTaeyun An <ty.an@samsung.com>
Thu, 4 Apr 2013 14:16:50 +0000 (23:16 +0900)
committerTaeyun An <ty.an@samsung.com>
Thu, 4 Apr 2013 14:41:30 +0000 (23:41 +0900)
[Title] Move the position to hide ClipboardWindow
[Issue#] N/A
[Problem] ClipboardWindow does not disappear when hiding IME
[Cause] invalid postion for the code to hide clipboard window
[Solution] hid ClipboardWindow when the callback for IME status is called

Change-Id: I9f12822a5bf47fbb509c6db25151c093091f52a5

Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp

index 5b941dd..db3b2c2 100755 (executable)
@@ -54,6 +54,10 @@ void InputMethodContextEfl::onIMFInputPanelStateChanged(void* data, Ecore_IMF_Co
     InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
 
     if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
+        if (inputMethodContext->m_viewImpl->pageClient->isClipboardWindowOpened())
+            inputMethodContext->m_viewImpl->pageClient->closeClipboardWindow();
+#endif
         evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,ime,closed", 0);
         if (inputMethodContext->m_context)
             evas_object_focus_set(inputMethodContext->m_viewImpl->view(), false);
@@ -332,13 +336,6 @@ void InputMethodContextEfl::updateTextInputState()
         Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
         bool defaultKeypadEnabled = ewk_settings_default_keypad_enabled_get(settings);
 
-#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
-        if (m_viewImpl->pageClient->isClipboardWindowOpened()) {
-            LOG(ISF, "[FAIL] Clipboard\n");
-            return;
-        }
-#endif
-
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
         if (editor.inputMethodHints == "date") {
             ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_DATE, editor.surroundingText);
@@ -379,6 +376,13 @@ void InputMethodContextEfl::updateTextInputState()
 #endif
 #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 
+#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
+        if (m_viewImpl->pageClient->isClipboardWindowOpened()) {
+            LOG(ISF, "[FAIL] Clipboard\n");
+            return;
+        }
+#endif
+
         bool hasFocus = evas_object_focus_get(m_viewImpl->view());
 
         if (!defaultKeypadEnabled) {
@@ -528,11 +532,6 @@ void InputMethodContextEfl::hideIMFContext()
     if (!m_context)
         return;
 
-#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
-    if (m_viewImpl->pageClient->isClipboardWindowOpened())
-        m_viewImpl->pageClient->closeClipboardWindow();
-#endif
-
     if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
         ecore_imf_context_reset(m_context.get());
         ecore_imf_context_input_panel_hide(m_context.get());