From c2956e8bd2de01de4fdfc6e8a8eb41ef2df91134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 23 Jan 2020 19:09:50 +0100 Subject: [PATCH] st/entry: Notify "text" prop on every change in the ClutterText Notifying the "text" property inside `st_entry_set_text()` misses all the text changes done by ClutterText itself, including those that happen on key-presses. Fix that by notifying that property inside the "notify::text" handler connected to the ClutterText. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/951 --- src/st/st-entry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/st/st-entry.c b/src/st/st-entry.c index ba3d1ca60..24fe7434c 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -542,6 +542,8 @@ clutter_text_changed_cb (GObject *object, /* Since the text changed, force a regen of the shadow texture */ cogl_clear_object (&priv->text_shadow_material); + + g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]); } static void @@ -1054,7 +1056,8 @@ st_entry_set_text (StEntry *entry, clutter_text_set_text (CLUTTER_TEXT (priv->entry), text); - g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]); + /* Note: PROP_TEXT will get notfied from our notify::text handler connected + * to priv->entry. */ } /**