text view: Improve tag pointer tracking

A problem that has been observed in polari is that links in tags
are clickable all the way into the margin. This problem is caused
by gtk_text_view_get_iter_at_position ignoring the return value
of pango_layout_xy_to_index. Instead, pass it back as a boolean
return value. This is technically an API break, but we've allowed
ourselves to change return types from void to gboolean before.
This commit is contained in:
Matthias Clasen
2016-02-10 00:01:54 -05:00
parent 019dab7c38
commit a3a5cf1087
4 changed files with 60 additions and 49 deletions

View File

@ -259,12 +259,12 @@ void gtk_text_view_get_iter_location (GtkTextView *text_view,
const GtkTextIter *iter,
GdkRectangle *location);
GDK_AVAILABLE_IN_ALL
void gtk_text_view_get_iter_at_location (GtkTextView *text_view,
gboolean gtk_text_view_get_iter_at_location (GtkTextView *text_view,
GtkTextIter *iter,
gint x,
gint y);
GDK_AVAILABLE_IN_ALL
void gtk_text_view_get_iter_at_position (GtkTextView *text_view,
gboolean gtk_text_view_get_iter_at_position (GtkTextView *text_view,
GtkTextIter *iter,
gint *trailing,
gint x,