From cd118f0dc0172be089519b47da721eeca67bbc30 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 11 Feb 2012 16:02:31 +0000 Subject: [PATCH] text: Fix regression When the ClutterTextBuffer support inside ClutterText was merged, it introduced a regression that was identified and fixed in bug 659116. The optimization to not paint empty ClutterText actors is only valid is the actor is not editable, or if the cursor is not visible. --- clutter/clutter-text.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 5f72367fc..a7635e46d 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -2011,14 +2011,11 @@ clutter_text_paint (ClutterActor *self) tied to the workings of this function */ n_chars = clutter_text_buffer_get_length (get_buffer (text)); - if (G_UNLIKELY (priv->font_desc == NULL || n_chars == 0)) - { - CLUTTER_NOTE (ACTOR, "desc: %p", - priv->font_desc ? priv->font_desc : 0x0); - return; - } - /* don't bother painting an empty text actor */ + /* don't bother painting an empty text actor, unless it's + * editable, in which case we want to paint at least the + * cursor + */ if (n_chars == 0 && (!priv->editable || !priv->cursor_visible)) return;