summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index d66f719fc9f..c87d8981daf 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4116,8 +4116,12 @@ x_draw_image_foreground (s)
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 @@ x_draw_image_foreground_1 (s, pixmap)
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