diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-03-26 21:38:28 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-03-26 21:38:28 -0400 |
commit | 4b2c4ab109a770c9b424b24a66459fb2295e8771 (patch) | |
tree | 7809dc18ea5b0d75fcc3f77f8c274c9fca0b197f /gtk/gtkimcontextwayland.c | |
parent | f494d6ae1fefba4e465fca967b4d13ce60178f9f (diff) | |
download | gtk+-4b2c4ab109a770c9b424b24a66459fb2295e8771.tar.gz |
wayland: Don't emit signals if nothing changedim-wayland-reset
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.
Diffstat (limited to 'gtk/gtkimcontextwayland.c')
-rw-r--r-- | gtk/gtkimcontextwayland.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index af195581c8..5bb7ecd04d 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -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"); |