If the Text actor is neither editable nor has its cursor set
to visible, then we should not be ensuring the cursor position.
This fixes a failure in the conformance test unit for the
layout cache.
return;
}
- clutter_text_ensure_cursor_position (text);
-
clutter_actor_get_allocation_box (self, &alloc);
layout = clutter_text_create_layout (text, alloc.x2 - alloc.x1);
- if (priv->single_line_mode)
+ if (priv->editable && priv->cursor_visible)
+ clutter_text_ensure_cursor_position (text);
+
+ if (priv->editable && priv->single_line_mode)
{
PangoRectangle logical_rect = { 0, };
gint actor_width, text_width;