summaryrefslogtreecommitdiff
path: root/src/macterm.c
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2002-05-08 21:32:00 +0000
committerKim F. Storm <storm@cua.dk>2002-05-08 21:32:00 +0000
commit534c20b22f89ffbe99a4d6a1035b74eacc544ee5 (patch)
treed66de8c7533c0eea729352c5f5fdd8eee551b424 /src/macterm.c
parentc65eff23e27dc22b32f5c4b0f0070c8a717b2f5d (diff)
downloademacs-534c20b22f89ffbe99a4d6a1035b74eacc544ee5.tar.gz
emacs-534c20b22f89ffbe99a4d6a1035b74eacc544ee5.tar.bz2
emacs-534c20b22f89ffbe99a4d6a1035b74eacc544ee5.zip
(x_draw_image_foreground, x_draw_image_foreground_1):
Enlarge cursor rectangle drawn around image with non-zero relief.
Diffstat (limited to 'src/macterm.c')
-rw-r--r--src/macterm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/macterm.c b/src/macterm.c
index 5fb67a9a588..15a63c58bd2 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -4395,8 +4395,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)
- 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 @@ 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)
- 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