[gtk/sloped-caret: 8/8] Use pango_layout_get_caret_pos
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/sloped-caret: 8/8] Use pango_layout_get_caret_pos
- Date: Wed, 25 Aug 2021 12:15:09 +0000 (UTC)
commit 2f1db4b77c0009d4dab81a88e78892fec20954bc
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 24 16:49:30 2021 -0400
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]