From 16185c78fc59f8538f0a439908bd43ae8ee981fe Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Thu, 14 May 2009 10:51:58 +0100 Subject: [PATCH] [text] take scrolling into account when calculating cursor position Account for the scrolling in single line more when calculating the cursor position from coordinates. --- clutter/clutter-text.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 53f249768..7e295a497 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -463,6 +463,10 @@ clutter_text_coords_to_position (ClutterText *text, gint px, py; gint trailing; + /* Take any offset due to scrolling into account */ + if (text->priv->single_line_mode) + x += text->priv->text_x * -1; + px = x * PANGO_SCALE; py = y * PANGO_SCALE;