Take cursor width into account when calculating the area to be

2006-03-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (text_window_invalidate_cursors): Take
	cursor width into account when calculating the area to
	be invalidated.  (#333377, #323401 Steve Frécinaux)
This commit is contained in:
Matthias Clasen 2006-03-07 02:05:02 +00:00 committed by Matthias Clasen
parent ede9695875
commit 1f5c294851
3 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2006-03-06 Matthias Clasen <mclasen@redhat.com>
* 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)

View File

@ -1,5 +1,9 @@
2006-03-06 Matthias Clasen <mclasen@redhat.com>
* 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)

View File

@ -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++;