text: relayout on cursor visibility change

When the cursor visibility changes, we have to relayout the ClutterText
actor instead of just redrawing it - as the cursor changes the
PangoLayout size, a size request cycle is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=702610
This commit is contained in:
Cosimo Cecchi 2013-06-18 16:37:31 -07:00
parent c0b148232d
commit 4d8d5a62f3

View File

@ -4631,7 +4631,8 @@ clutter_text_set_cursor_visible (ClutterText *self,
{ {
priv->cursor_visible = cursor_visible; priv->cursor_visible = cursor_visible;
clutter_text_queue_redraw (CLUTTER_ACTOR (self)); clutter_text_dirty_cache (self);
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CURSOR_VISIBLE]); g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CURSOR_VISIBLE]);
} }