[clutter] clutter-text: Make sure to paint the background of a text actor



commit f5a620ed3bd9d7d86bb51c8ec7c7102c016e89e2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jul 25 13:34:03 2012 -0300

    clutter-text: Make sure to paint the background of a text actor
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682070

 clutter/clutter-text.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 043c444..cb9cf4a 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -2185,13 +2185,6 @@ clutter_text_paint (ClutterActor *self)
      tied to the workings of this function */
   n_chars = clutter_text_buffer_get_length (get_buffer (text));
 
-  /* 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;
-
   clutter_actor_get_allocation_box (self, &alloc);
 
   g_object_get (self, "background-color-set", &bg_color_set, NULL);
@@ -2211,6 +2204,13 @@ clutter_text_paint (ClutterActor *self)
       cogl_rectangle (0, 0, alloc.x2 - alloc.x1, alloc.y2 - alloc.y1);
     }
 
+  /* 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;
+
   if (priv->editable && priv->single_line_mode)
     layout = clutter_text_create_layout (text, -1, -1);
   else



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