diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-03-30 20:14:40 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-03-30 20:14:40 +0000 |
commit | f78598dd9b540be8e0cf34883fa40b3c63f9b7c7 (patch) | |
tree | 57cfa2cc1e05a8df086a0a7953719d732f458ed0 | |
parent | 2f3cf6227a8ed231458e998d798f8f821371aacd (diff) | |
parent | 4b2c4ab109a770c9b424b24a66459fb2295e8771 (diff) | |
download | gtk+-f78598dd9b540be8e0cf34883fa40b3c63f9b7c7.tar.gz |
Merge branch 'im-wayland-reset' into 'master'
wayland: Don't emit signals if nothing changed
See merge request GNOME/gtk!83
-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"); |