[clutter] text: Fix regression



commit cd118f0dc0172be089519b47da721eeca67bbc30
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Feb 11 16:02:31 2012 +0000

    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 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 5f72367..a7635e4 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]