summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-03-30 20:14:40 +0000
committerMatthias Clasen <mclasen@redhat.com>2018-03-30 20:14:40 +0000
commitf78598dd9b540be8e0cf34883fa40b3c63f9b7c7 (patch)
tree57cfa2cc1e05a8df086a0a7953719d732f458ed0
parent2f3cf6227a8ed231458e998d798f8f821371aacd (diff)
parent4b2c4ab109a770c9b424b24a66459fb2295e8771 (diff)
downloadgtk+-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.c3
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");