From: Matthias Clasen Date: Sun, 23 Jan 2022 14:09:57 +0000 (-0500) Subject: Use pango api better X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~4^2~61^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4fe976549eef7b1986def03b31e78bb556f6cddb;p=gtk4.git Use pango api better Avoid direct access to PangoLayoutLine members, use pango api for it where we can. --- diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 5def4168b6..7560e551fe 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -899,8 +899,8 @@ get_cursor_direction (GtkLabel *self) * definitely in this paragraph, which is good enough * to figure out the resolved direction. */ - if (line->start_index + line->length >= self->select_info->selection_end) - return line->resolved_dir; + if (pango_layout_line_get_start_index (line) + pango_layout_line_get_length (line) >= self->select_info->selection_end) + return pango_layout_line_get_resolved_direction (line); } return PANGO_DIRECTION_LTR;