Mercurial > emacs
changeset 45197:0b6da8b7d7ac
(x_draw_image_foreground, x_draw_image_foreground_1):
Enlarge cursor rectangle drawn around image with non-zero relief.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 08 May 2002 21:32:00 +0000 |
parents | fb8359237a78 |
children | 0f3260023919 |
files | src/macterm.c src/xterm.c |
diffstat | 2 files changed, 24 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macterm.c Wed May 08 21:30:57 2002 +0000 +++ b/src/macterm.c Wed May 08 21:32:00 2002 +0000 @@ -4395,8 +4395,12 @@ the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) - mac_draw_rectangle (s->display, s->window, s->gc, x, y, - s->img->width - 1, s->img->height - 1); + { + int r = s->img->relief; + if (r < 0) r = -r; + mac_draw_rectangle (s->display, s->window, s->gc, x - r, y - r, + s->img->width + r*2 - 1, s->img->height + r*2 - 1); + } } } else @@ -4514,8 +4518,12 @@ the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) - mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x, y, - s->img->width - 1, s->img->height - 1); + { + int r = s->img->relief; + if (r < 0) r = -r; + mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x - r, y - r, + s->img->width + r*2 - 1, s->img->height + r*2 - 1); + } } } else
--- a/src/xterm.c Wed May 08 21:30:57 2002 +0000 +++ b/src/xterm.c Wed May 08 21:32:00 2002 +0000 @@ -4116,8 +4116,12 @@ the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) - XDrawRectangle (s->display, s->window, s->gc, x, y, - s->img->width - 1, s->img->height - 1); + { + int r = s->img->relief; + if (r < 0) r = -r; + XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, + s->img->width + r*2 - 1, s->img->height + r*2 - 1); + } } } else @@ -4232,8 +4236,12 @@ the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) - XDrawRectangle (s->display, pixmap, s->gc, x, y, - s->img->width - 1, s->img->height - 1); + { + int r = s->img->relief; + if (r < 0) r = -r; + XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, + s->img->width + r*2 - 1, s->img->height + r*2 - 1); + } } } else