void GtkInputMethodFilter::notifyMouseButtonPress()
{
    // Confirming the composition may trigger a selection change, which
    // might trigger further unwanted actions on the context, so we prevent
    // that by setting m_composingTextCurrently to false.
    if (m_composingTextCurrently)
        confirmCurrentComposition();
    m_composingTextCurrently = false;
    cancelContextComposition();
}
void GtkInputMethodFilter::notifyFocusedOut()
{
    if (!m_enabled)
        return;

    if (m_composingTextCurrently)
        confirmCurrentComposition();
    cancelContextComposition();
    gtk_im_context_focus_out(m_context.get());
    m_enabled = false;
}
void GtkInputMethodFilter::resetContext()
{

    // We always cancel the current WebCore composition here, in case the
    // composition was set outside the GTK+ IME path (via a script, for
    // instance) and we aren't tracking it.
    cancelCurrentComposition();

    if (!m_composingTextCurrently)
        return;
    m_composingTextCurrently = false;
    cancelContextComposition();
}
Esempio n. 4
0
void InputMethodFilter::notifyMouseButtonPress()
{
#if ENABLE(API_TESTS)
    ASSERT(m_page || m_testingMode);
#else
    ASSERT(m_page);
#endif

    // Confirming the composition may trigger a selection change, which
    // might trigger further unwanted actions on the context, so we prevent
    // that by setting m_composingTextCurrently to false.
    confirmCurrentComposition();
    cancelContextComposition();
}
Esempio n. 5
0
void InputMethodFilter::notifyFocusedOut()
{
#if ENABLE(API_TESTS)
    ASSERT(m_page || m_testingMode);
#else
    ASSERT(m_page);
#endif
    if (!m_enabled)
        return;

    confirmCurrentComposition();
    cancelContextComposition();
    gtk_im_context_focus_out(m_context.get());
}