[gtk/matthiasc/for-main] Use pango api better




commit 4fe976549eef7b1986def03b31e78bb556f6cddb
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 23 09:09:57 2022 -0500

    Use pango api better
    
    Avoid direct access to PangoLayoutLine members,
    use pango api for it where we can.

 gtk/gtklabel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]