Commit 49ad1d99 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(x_draw_image_foreground): Avoid drawing outside

of the clip area when image doesn't have a mask.
parent b28cb6ed
2000-08-07 Gerd Moellmann <gerd@gnu.org>
 
* xdisp.c (start_display): WHen starting display on a continuation
line, clear ascent and descent members of the iterator structure;
the height of the continued line does not affect the height of the
continuation line.
(make_cursor_line_fully_visible): Do nothing if cursor is on a
line taller than the window.
(redisplay_window) <forced window start>: Handle case that the
middle of the window is not found in any row.
(dump_glyph_row): Show more information.
(compute_line_metrics): Use MATRIX_FIRST_TEXT_ROW to determine the
first text line in a glyph matrix.
* xterm.c (x_draw_image_foreground): Avoid drawing outside
of the clip area when image doesn't have a mask.
* fns.c (sweep_weak_table): Fix survival conditions for
key-or-value and key-and-value weakness.
 
......
......@@ -3720,8 +3720,18 @@ x_draw_image_foreground (s)
}
else
{
XCopyArea (s->display, s->img->pixmap, s->window, s->gc,
0, 0, s->img->width, s->img->height, x, y);
unsigned long mask = GCClipXOrigin | GCClipYOrigin | GCFunction;
XGCValues xgcv;
XRectangle clip_rect, image_rect, r;
x_get_glyph_string_clip_rect (s, &clip_rect);
image_rect.x = x;
image_rect.y = y;
image_rect.width = s->img->width;
image_rect.height = s->img->height;
if (x_intersect_rectangles (&clip_rect, &image_rect, &r))
XCopyArea (s->display, s->img->pixmap, s->window, s->gc,
r.x - x, r.y - y, r.width, r.height, r.x, r.y);
/* When the image has a mask, we can expect that at
least part of a mouse highlight or a block cursor will
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment