clutter-text: Don't move the cursor to the left when at pos 0

When the cursor is at the leftmost position in the text the drawn
pixel position is moved to the left by the size of the cursor. There's
no explanation for why this happens and it doesn't seem to make any
sense so this patch removes it. It makes multi-line texts looks odd
because the cursor ends up at a different horizontal position when it
is on the first line from any other line. It also makes using
priv->cursor_pos difficult in any other part of the code because the
paint function modifies it.

The original patch that added this can be traced back to Tidy commit
c356487c15. There's no explanation in the commit message either.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2599
This commit is contained in:
Neil Roberts 2011-03-08 17:30:04 +00:00
parent 5012087588
commit a20a8071ed

View File

@ -1394,9 +1394,6 @@ selection_paint (ClutterText *self)
position = priv->position; position = priv->position;
if (position == 0)
priv->cursor_pos.x -= priv->cursor_size;
if (position == priv->selection_bound) if (position == priv->selection_bound)
{ {
/* No selection, just draw the cursor */ /* No selection, just draw the cursor */