fixed couple of drawing problems with block cursor (#448321).

2007-06-16  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtktextdisplay.c (render_para): fixed couple of drawing
	problems with block cursor (#448321).


svn path=/trunk/; revision=18167
This commit is contained in:
Yevgen Muntyan 2007-06-16 23:18:29 +00:00 committed by Yevgen Muntyan
parent ccc745637c
commit f1b24665bb
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2007-06-16 Yevgen Muntyan <muntyan@tamu.edu>
* gtk/gtktextdisplay.c (render_para): fixed couple of drawing
problems with block cursor (#448321).
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (gdk_event_translate): Ignore

View File

@ -662,11 +662,10 @@ render_para (GtkTextRenderer *text_renderer,
cursor_gc = _gtk_widget_get_cursor_gc (text_renderer->widget);
cursor_rect.x = x + line_display->x_offset + line_display->block_cursor.x;
cursor_rect.y = selection_y;
cursor_rect.y = y + line_display->block_cursor.y + line_display->top_margin;
cursor_rect.width = line_display->block_cursor.width;
cursor_rect.height = selection_height;
cursor_rect.height = line_display->block_cursor.height;
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (text_renderer), NULL);
gdk_gc_set_clip_rectangle (cursor_gc, &cursor_rect);
gdk_draw_rectangle (text_renderer->drawable,
@ -677,6 +676,8 @@ render_para (GtkTextRenderer *text_renderer,
cursor_rect.width,
cursor_rect.height);
gdk_gc_set_clip_region (cursor_gc, NULL);
/* draw text under the cursor if any */
if (!line_display->cursor_at_line_end)
{
@ -684,6 +685,7 @@ render_para (GtkTextRenderer *text_renderer,
cursor_text_gc = text_renderer->widget->style->base_gc[text_renderer->widget->state];
gdk_gc_set_clip_rectangle (cursor_text_gc, &cursor_rect);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (text_renderer), cursor_text_gc);
text_renderer_set_state (text_renderer, CURSOR);
@ -695,8 +697,6 @@ render_para (GtkTextRenderer *text_renderer,
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (text_renderer), fg_gc);
gdk_gc_set_clip_region (cursor_text_gc, NULL);
}
gdk_gc_set_clip_region (cursor_gc, NULL);
}
}