From 3d8bf019726d76a53116f7a5a17cce4cab782f0d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 6 Feb 2017 10:30:26 -0500 Subject: [PATCH] And implemented the hit-testing functions on GTK+. --- unix/drawtext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/drawtext.c b/unix/drawtext.c index 7c1f13e4..b0d44833 100644 --- a/unix/drawtext.c +++ b/unix/drawtext.c @@ -4,6 +4,7 @@ // TODO // - if the RTL override is at the beginning of a line, the preceding space is included? +// - the space at the end of a line seems to capture the entire end of that line, especially in hit-testing :S it should work like it does on other platforms struct uiDrawTextLayout { PangoLayout *layout; @@ -222,7 +223,7 @@ void uiDrawTextLayoutHitTest(uiDrawTextLayout *tl, double x, double y, uiDrawTex void uiDrawTextLayoutByteRangeToRectangle(uiDrawTextLayout *tl, size_t start, size_t end, uiDrawTextLayoutByteRangeRectangle *r) { PangoRectangle startRect, endRect; - int line; + int line, index; PangoLayoutLine *pll; pango_layout_index_to_pos(tl->layout, start, &startRect);