[clutter/clutter-1.16] text: relayout on cursor visibility change



commit 4d8d5a62f34182f6e8e2866d6203c31b79d4ea6c
Author: Cosimo Cecchi <cosimo endlessm com>
Date:   Tue Jun 18 16:37:31 2013 -0700

    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

 clutter/clutter-text.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 7b83ad6..9fb4348 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -4631,7 +4631,8 @@ clutter_text_set_cursor_visible (ClutterText *self,
     {
       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]);
     }


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