From 1f5c294851a009295c9d331110512e47324d09c0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Mar 2006 02:05:02 +0000 Subject: [PATCH] Take cursor width into account when calculating the area to be MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-03-06 Matthias Clasen * gtk/gtktextview.c (text_window_invalidate_cursors): Take cursor width into account when calculating the area to be invalidated. (#333377, #323401 Steve Frécinaux) --- ChangeLog | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ gtk/gtktextview.c | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 22b99c4abc..93f5f7e8b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-03-06 Matthias Clasen + * gtk/gtktextview.c (text_window_invalidate_cursors): Take + cursor width into account when calculating the area to + be invalidated. (#333377, #323401 Steve Frécinaux) + * gtk/gtkmain.c (post_parse_hook): Set error when returning FALSE. (#333268, Paolo Maggi, Christian Persch) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 22b99c4abc..93f5f7e8b2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2006-03-06 Matthias Clasen + * gtk/gtktextview.c (text_window_invalidate_cursors): Take + cursor width into account when calculating the area to + be invalidated. (#333377, #323401 Steve Frécinaux) + * gtk/gtkmain.c (post_parse_hook): Set error when returning FALSE. (#333268, Paolo Maggi, Christian Persch) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 922247aa33..8b4bec7512 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -7479,10 +7479,12 @@ text_window_invalidate_cursors (GtkTextWindow *win) gtk_widget_style_get (win->widget, "cursor-aspect-ratio", &cursor_aspect_ratio, NULL); - + stem_width = strong.height * cursor_aspect_ratio + 1; arrow_width = stem_width + 1; + strong.width = stem_width; + /* round up to the next even number */ if (stem_width & 1) stem_width++; @@ -7503,6 +7505,8 @@ text_window_invalidate_cursors (GtkTextWindow *win) stem_width = weak.height * cursor_aspect_ratio + 1; arrow_width = stem_width + 1; + weak.width = stem_width; + /* round up to the next even number */ if (stem_width & 1) stem_width++;