diff --git a/ChangeLog b/ChangeLog index 918c969ed..e2b42ab0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-23 Emmanuele Bassi + + Bug 905 - Paint cursor directly (Xan López) + + * clutter/clutter-entry.c: + (clutter_entry_paint_cursor), + (clutter_entry_init), + (clutter_entry_set_color): Directly paint the cursor on the + entry instead of using an actor. + 2008-06-23 Emmanuele Bassi Bug 981 - clutter_stage_read_pixels temprow fix (Haakon Sporsheim) diff --git a/clutter/clutter-entry.c b/clutter/clutter-entry.c index 8489adcb4..fd57b6024 100644 --- a/clutter/clutter-entry.c +++ b/clutter/clutter-entry.c @@ -37,6 +37,8 @@ #include "config.h" #endif +#include + #include "clutter-entry.h" #include "clutter-debug.h" @@ -126,7 +128,6 @@ struct _ClutterEntryPrivate gint width_chars; ClutterGeometry cursor_pos; - ClutterActor *cursor; gboolean show_cursor; }; @@ -381,15 +382,15 @@ clutter_entry_paint_cursor (ClutterEntry *entry) if (priv->show_cursor) { - clutter_actor_set_size (CLUTTER_ACTOR (priv->cursor), - priv->cursor_pos.width, - priv->cursor_pos.height); + cogl_push_matrix (); - clutter_actor_set_position (priv->cursor, - priv->cursor_pos.x, - priv->cursor_pos.y); + cogl_color (&priv->fgcol); + cogl_rectangle (priv->cursor_pos.x, + priv->cursor_pos.y, + priv->cursor_pos.width, + priv->cursor_pos.height); - clutter_actor_paint (priv->cursor); + cogl_pop_matrix (); } } @@ -904,9 +905,6 @@ clutter_entry_init (ClutterEntry *self) / 72.0; clutter_actor_set_size (CLUTTER_ACTOR (self), font_size * 20, 50); - priv->cursor = clutter_rectangle_new_with_color (&priv->fgcol); - clutter_actor_set_parent (priv->cursor, CLUTTER_ACTOR (self)); - priv->show_cursor = TRUE; } @@ -1183,8 +1181,6 @@ clutter_entry_set_color (ClutterEntry *entry, clutter_actor_set_opacity (actor, priv->fgcol.alpha); - clutter_rectangle_set_color (CLUTTER_RECTANGLE (priv->cursor), &priv->fgcol); - if (CLUTTER_ACTOR_IS_VISIBLE (actor)) clutter_actor_queue_redraw (actor);