mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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.
This commit is contained in:
parent
729e9985c1
commit
ba4615cd4b
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user