From f5a620ed3bd9d7d86bb51c8ec7c7102c016e89e2 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 25 Jul 2012 13:34:03 -0300 Subject: [PATCH] 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 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 043c44445..cb9cf4a0a 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