[clutter] text: Implement the ::has_overlaps virtual



commit 729e9985c1aec44f008e9687cdd1bf0818acc95d
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Fri May 13 14:17:39 2011 +0100

    text: Implement the ::has_overlaps virtual
    
    Since ClutterText has overlapping primitives when selecting, or a
    visible cursor, then we need to report that to Clutter, to avoid
    bleeding colors through when a Text actor is non-fully opaque.

 clutter/clutter-text.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index ce2139e..2439d53 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -2117,6 +2117,16 @@ clutter_text_allocate (ClutterActor           *self,
   parent_class->allocate (self, box, flags);
 }
 
+static gboolean
+clutter_text_has_overlaps (ClutterActor *self)
+{
+  ClutterTextPrivate *priv = CLUTTER_TEXT (self)->priv;
+
+  return priv->editable ||
+         priv->selectable ||
+         priv->cursor_visible;
+}
+
 static void
 clutter_text_key_focus_in (ClutterActor *actor)
 {
@@ -2587,6 +2597,7 @@ clutter_text_class_init (ClutterTextClass *klass)
   actor_class->motion_event = clutter_text_motion;
   actor_class->key_focus_in = clutter_text_key_focus_in;
   actor_class->key_focus_out = clutter_text_key_focus_out;
+  actor_class->has_overlaps = clutter_text_has_overlaps;
 
   /**
    * ClutterText:font-name:



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