Remove the assertions that x_offset and y_offset must be >= 0. Clip the

2001-05-17  Joe Shaw  <joe@ximian.com>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
	that x_offset and y_offset must be >= 0. Clip the cursor being drawn
	if it is only partially onscreen.
This commit is contained in:
Joe Shaw 2001-05-18 03:41:30 +00:00 committed by Joe Shaw
parent 69ef340389
commit 288ff7e058
8 changed files with 44 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -1,3 +1,9 @@
2001-05-17 Joe Shaw <joe@ximian.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove the assertions
that x_offset and y_offset must be >= 0. Clip the cursor being drawn
if it is only partially onscreen.
Thu May 17 17:10:13 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c: Make logical motion and deletion by graphemes,

View File

@ -698,8 +698,6 @@ gtk_text_layout_draw (GtkTextLayout *layout,
g_return_if_fail (layout->default_style != NULL);
g_return_if_fail (layout->buffer != NULL);
g_return_if_fail (drawable != NULL);
g_return_if_fail (x_offset >= 0);
g_return_if_fail (y_offset >= 0);
g_return_if_fail (width >= 0);
g_return_if_fail (height >= 0);
@ -794,11 +792,13 @@ gtk_text_layout_draw (GtkTextLayout *layout,
else
gc = widget->style->text_gc[GTK_STATE_NORMAL];
gdk_gc_set_clip_rectangle(gc, &clip);
gdk_draw_line (drawable, gc,
line_display->x_offset + cursor->x - x_offset,
current_y + line_display->top_margin + cursor->y,
line_display->x_offset + cursor->x - x_offset,
current_y + line_display->top_margin + cursor->y + cursor->height - 1);
gdk_gc_set_clip_rectangle(gc, NULL);
cursor_list = cursor_list->next;
}