[gtk/ngl-textview-cursor] textview: Fix blinking block cursors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-textview-cursor] textview: Fix blinking block cursors
- Date: Sat, 13 Mar 2021 03:11:57 +0000 (UTC)
commit 9be2f130f05fe2fff9a9de6d49f27f36fd6a2355
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 12 19:44:31 2021 -0500
textview: Fix blinking block cursors
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.
gtk/gtktextlayout.c | 7 +++++++
1 file changed, 7 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]