summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2005-05-25 10:22:37 +0000
committerMichael Natterer <mitch@src.gnome.org>2005-05-25 10:22:37 +0000
commite3f318b459beb75afa6ea20e0492e9a6d6da9c86 (patch)
treefcc081fa802ed0a323e6fafd3d51f9d16835aa44 /gtk/gtkstyle.c
parent39c5b780e72e5b3fa4f8163ec3f112a36bd0e11d (diff)
downloadgtk+-e3f318b459beb75afa6ea20e0492e9a6d6da9c86.tar.gz
block the text_layout's "changed" handler when changing cursor visibility
2005-05-25 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (blink_cb): block the text_layout's "changed" handler when changing cursor visibility because it would expose the whole paragraph where the cursor is. Instead, expose the cursors' areas manually. (#173047). (text_window_invalidate_cursors): new function which exposes the cursors. * gtk/gtkstyle.c (draw_insertion_cursor): added comment that the same cursor size calculation is in text_window_invalidate_cursors().
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index d2af4bf082..8fa082a6b3 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -6628,7 +6628,11 @@ draw_insertion_cursor (GtkWidget *widget,
gint offset;
g_return_if_fail (direction != GTK_TEXT_DIR_NONE);
-
+
+ /* When changing the shape or size of the cursor here,
+ * propagate the changes to gtktextview.c:text_window_invalidate_cursors().
+ */
+
gtk_widget_style_get (widget, "cursor-aspect-ratio", &cursor_aspect_ratio, NULL);
stem_width = location->height * cursor_aspect_ratio + 1;