diff --git a/src/st/st-entry.c b/src/st/st-entry.c index d50c2548b..e2e985df6 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -562,6 +562,16 @@ clutter_text_changed_cb (GObject *object, g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]); } +static void +invalidate_shadow_pipeline (GObject *object, + GParamSpec *pspec, + StEntry *entry) +{ + StEntryPrivate *priv = ST_ENTRY_PRIV (entry); + + g_clear_pointer (&priv->text_shadow_material, cogl_object_unref); +} + static void st_entry_clipboard_callback (StClipboard *clipboard, const gchar *text, @@ -1058,6 +1068,20 @@ st_entry_init (StEntry *entry) g_signal_connect (priv->entry, "notify::text", G_CALLBACK (clutter_text_changed_cb), entry); + /* These properties might get set from CSS using _st_set_text_from_style */ + g_signal_connect (priv->entry, "notify::font-description", + G_CALLBACK (invalidate_shadow_pipeline), entry); + + g_signal_connect (priv->entry, "notify::attributes", + G_CALLBACK (invalidate_shadow_pipeline), entry); + + g_signal_connect (priv->entry, "notify::justify", + G_CALLBACK (invalidate_shadow_pipeline), entry); + + g_signal_connect (priv->entry, "notify::line-alignment", + G_CALLBACK (invalidate_shadow_pipeline), entry); + + priv->spacing = 6.0f; priv->text_shadow_material = NULL;