[clutter/text-selection-color: 4/5] text: Check the has_focus flag in selection_paint()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/text-selection-color: 4/5] text: Check the has_focus flag in selection_paint()
- Date: Fri, 13 May 2011 13:36:06 +0000 (UTC)
commit b44b328bf7a31c48d1965b846b98fffecdc07200
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri May 13 14:26:22 2011 +0100
text: Check the has_focus flag in selection_paint()
It is the only place were it is used, so it should only be checked
there, and not in the general paint() implementation.
clutter/clutter-text.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 2439d53..258ad6a 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -1384,6 +1384,9 @@ selection_paint (ClutterText *self)
ClutterActor *actor = CLUTTER_ACTOR (self);
guint8 paint_opacity = clutter_actor_get_paint_opacity (actor);
+ if (!priv->has_focus)
+ return;
+
if (priv->editable && priv->cursor_visible)
{
const ClutterColor *color;
@@ -1965,8 +1968,7 @@ clutter_text_paint (ClutterActor *self)
real_opacity);
cogl_pango_render_layout (layout, text_x, 0, &color, 0);
- if (priv->has_focus)
- selection_paint (text);
+ selection_paint (text);
if (clip_set)
cogl_clip_pop ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]