Commit 24174e55 authored by Matthias Clasen's avatar Matthias Clasen

multipress: Only emit preedit signals if needed

When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644
parent 9f9c5ca4
......@@ -170,11 +170,14 @@ clear_compose_buffer (GtkImContextMultipress *multipress_context)
multipress_context->key_last_entered = 0;
multipress_context->compose_count = 0;
multipress_context->tentative_match = NULL;
cancel_automatic_timeout_commit (multipress_context);
g_signal_emit_by_name (multipress_context, "preedit-changed");
g_signal_emit_by_name (multipress_context, "preedit-end");
if (multipress_context->tentative_match)
{
multipress_context->tentative_match = NULL;
g_signal_emit_by_name (multipress_context, "preedit-changed");
g_signal_emit_by_name (multipress_context, "preedit-end");
}
}
/* Finish composing, provide the character, and clear our compose buffer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment