diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-12 19:44:31 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-12 21:50:07 -0500 |
commit | 9be2f130f05fe2fff9a9de6d49f27f36fd6a2355 (patch) | |
tree | ff9e2bf851ec0946360a922155a0d0ee8a79e73b | |
parent | 3a928c898007709066dabbc8f50c40f3f90a2527 (diff) | |
download | gtk+-9be2f130f05fe2fff9a9de6d49f27f36fd6a2355.tar.gz |
textview: Fix blinking block cursorsngl-textview-cursor
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
-rw-r--r-- | gtk/gtktextlayout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 358a92e517..b90e6d12f1 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -4236,6 +4236,13 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, selection_end_index = -1; } + if (line_display->node != NULL) + { + if (line_display->has_block_cursor && + gtk_widget_has_focus (widget)) + g_clear_pointer (&line_display->node, gsk_render_node_unref); + } + if (line_display->node == NULL) { gtk_snapshot_push_collect (snapshot); |