mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
[text] take scrolling into account when calculating cursor position
Account for the scrolling in single line more when calculating the cursor position from coordinates.
This commit is contained in:
parent
e162d0b060
commit
16185c78fc
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user