diff options
| author | Gerd Moellmann | 2000-08-07 21:54:31 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-07 21:54:31 +0000 |
| commit | 49ad1d991e2fe0650a0f853cb1f45409d8cc0634 (patch) | |
| tree | cbce23bab154c496b2f22070757bb4ea8acfcd96 /src | |
| parent | b28cb6ed7a7099b13c663047dedd9573e774833f (diff) | |
| download | emacs-49ad1d991e2fe0650a0f853cb1f45409d8cc0634.tar.gz emacs-49ad1d991e2fe0650a0f853cb1f45409d8cc0634.zip | |
(x_draw_image_foreground): Avoid drawing outside
of the clip area when image doesn't have a mask.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/xterm.c | 14 |
2 files changed, 27 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d0623ccc0b7..1b1def22adb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,20 @@ | |||
| 1 | 2000-08-07 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-08-07 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (start_display): WHen starting display on a continuation | ||
| 4 | line, clear ascent and descent members of the iterator structure; | ||
| 5 | the height of the continued line does not affect the height of the | ||
| 6 | continuation line. | ||
| 7 | (make_cursor_line_fully_visible): Do nothing if cursor is on a | ||
| 8 | line taller than the window. | ||
| 9 | (redisplay_window) <forced window start>: Handle case that the | ||
| 10 | middle of the window is not found in any row. | ||
| 11 | (dump_glyph_row): Show more information. | ||
| 12 | (compute_line_metrics): Use MATRIX_FIRST_TEXT_ROW to determine the | ||
| 13 | first text line in a glyph matrix. | ||
| 14 | |||
| 15 | * xterm.c (x_draw_image_foreground): Avoid drawing outside | ||
| 16 | of the clip area when image doesn't have a mask. | ||
| 17 | |||
| 3 | * fns.c (sweep_weak_table): Fix survival conditions for | 18 | * fns.c (sweep_weak_table): Fix survival conditions for |
| 4 | key-or-value and key-and-value weakness. | 19 | key-or-value and key-and-value weakness. |
| 5 | 20 | ||
diff --git a/src/xterm.c b/src/xterm.c index aec7d3b7338..391fd0f8ee1 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3720,8 +3720,18 @@ x_draw_image_foreground (s) | |||
| 3720 | } | 3720 | } |
| 3721 | else | 3721 | else |
| 3722 | { | 3722 | { |
| 3723 | XCopyArea (s->display, s->img->pixmap, s->window, s->gc, | 3723 | unsigned long mask = GCClipXOrigin | GCClipYOrigin | GCFunction; |
| 3724 | 0, 0, s->img->width, s->img->height, x, y); | 3724 | XGCValues xgcv; |
| 3725 | XRectangle clip_rect, image_rect, r; | ||
| 3726 | |||
| 3727 | x_get_glyph_string_clip_rect (s, &clip_rect); | ||
| 3728 | image_rect.x = x; | ||
| 3729 | image_rect.y = y; | ||
| 3730 | image_rect.width = s->img->width; | ||
| 3731 | image_rect.height = s->img->height; | ||
| 3732 | if (x_intersect_rectangles (&clip_rect, &image_rect, &r)) | ||
| 3733 | XCopyArea (s->display, s->img->pixmap, s->window, s->gc, | ||
| 3734 | r.x - x, r.y - y, r.width, r.height, r.x, r.y); | ||
| 3725 | 3735 | ||
| 3726 | /* When the image has a mask, we can expect that at | 3736 | /* When the image has a mask, we can expect that at |
| 3727 | least part of a mouse highlight or a block cursor will | 3737 | least part of a mouse highlight or a block cursor will |