From 2f1db4b77c0009d4dab81a88e78892fec20954bc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 24 Aug 2021 16:49:30 -0400 Subject: [PATCH] Use pango_layout_get_caret_pos This new api returns rectangles for sloped carets, in contrast to pango_layout_get_cursor_pos, which always returns a rectangle with a width of zero. --- gtk/gtkstylecontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 2642106bf0..864ee19da1 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -1166,7 +1166,7 @@ gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot, keyboard_direction = gdk_device_get_direction (keyboard); } - pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos); + pango_layout_get_caret_pos (layout, index, &strong_pos, &weak_pos); direction2 = PANGO_DIRECTION_NEUTRAL;