, m_contextID(0)
, m_state(ECORE_IMF_INPUT_PANEL_STATE_HIDE)
, m_inputPickerType(-1)
- , m_handleKeyDownEvent(false)
+ , m_doNotHandleFakeKeyEvent(false)
, m_fakeKeyEventTimer(this, &InputMethodContextEfl::fakeKeyEventTimerFired)
#endif
{
if (!eventInfo || !inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
return;
- if (!inputMethodContext->m_handleKeyDownEvent)
- inputMethodContext->requestFakeKeyEvent();
+ inputMethodContext->requestFakeKeyEvent();
Ecore_IMF_Event_Delete_Surrounding* event = static_cast<Ecore_IMF_Event_Delete_Surrounding*>(eventInfo);
inputMethodContext->m_viewImpl->page()->deleteSurroundingText(event->offset, event->n_chars);
if (!eventInfo || !inputMethodContext->m_focused)
return;
- if (!inputMethodContext->m_handleKeyDownEvent)
- inputMethodContext->requestFakeKeyEvent();
+ inputMethodContext->requestFakeKeyEvent();
inputMethodContext->m_viewImpl->page()->confirmComposition(String::fromUTF8(static_cast<char*>(eventInfo)));
}
if (!page->focusedFrame())
return;
- if (!inputMethodContext->m_handleKeyDownEvent)
- inputMethodContext->requestFakeKeyEvent();
+ inputMethodContext->requestFakeKeyEvent();
PageClientImpl* pageClient = inputMethodContext->m_viewImpl->pageClient.get();
IntRect caretRect;
void InputMethodContextEfl::handleMouseUpEvent(const Evas_Event_Mouse_Up*)
{
+#if ENABLE(TIZEN_ISF_PORT)
+ if (!m_context)
+ return;
+
+ resetIMFContext();
+#else
ecore_imf_context_reset(m_context.get());
+#endif
}
void InputMethodContextEfl::handleKeyDownEvent(const Evas_Event_Key_Down* downEvent, bool* isFiltered)
else
m_viewImpl->page()->prepareKeyDownEvent();
- m_handleKeyDownEvent = true;
+ m_doNotHandleFakeKeyEvent = true;
#endif
Ecore_IMF_Event inputMethodEvent;
*isFiltered = ecore_imf_context_filter_event(m_context.get(), ECORE_IMF_EVENT_KEY_DOWN, &inputMethodEvent);
#if ENABLE(TIZEN_ISF_PORT)
- m_handleKeyDownEvent = false;
+ m_doNotHandleFakeKeyEvent = false;
#endif
}
if (!m_context)
return;
+ m_doNotHandleFakeKeyEvent = true;
ecore_imf_context_reset(m_context.get());
+ m_doNotHandleFakeKeyEvent = false;
}
void InputMethodContextEfl::showIMFContext(const EditorState& editor)
m_viewImpl->pageClient->closeClipboardWindow();
#endif
- ecore_imf_context_reset(m_context.get());
+ resetIMFContext();
ecore_imf_context_focus_in(m_context.get());
ecore_imf_context_input_panel_show(m_context.get());
if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE
&& evas_object_focus_get(m_viewImpl->view())) {
- ecore_imf_context_reset(m_context.get());
+ resetIMFContext();
ecore_imf_context_input_panel_hide(m_context.get());
ecore_imf_context_focus_out(m_context.get());
}
void InputMethodContextEfl::requestFakeKeyEvent()
{
- if (m_handleKeyDownEvent || m_fakeKeyEventTimer.isActive())
+ if (m_doNotHandleFakeKeyEvent || m_fakeKeyEventTimer.isActive())
return;
m_fakeKeyEventTimer.startOneShot(0);