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.
This commit is contained in:
Matthias Clasen 2021-08-24 16:49:30 -04:00
parent f90e9b26f8
commit 2f1db4b77c

View File

@ -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;