wayland: Don't emit signals if nothing changed

We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.
This commit is contained in:
Matthias Clasen 2018-03-26 21:38:28 -04:00
parent f494d6ae1f
commit 4b2c4ab109

View File

@ -84,6 +84,9 @@ static GtkIMContextWaylandGlobal *global = NULL;
static void
reset_preedit (GtkIMContextWayland *context)
{
if (context->preedit.text == NULL)
return;
g_clear_pointer (&context->preedit.text, g_free);
context->preedit.cursor_idx = 0;
g_signal_emit_by_name (context, "preedit-changed");