diff options
| author | Kim F. Storm | 2002-05-08 21:32:00 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-05-08 21:32:00 +0000 |
| commit | 534c20b22f89ffbe99a4d6a1035b74eacc544ee5 (patch) | |
| tree | d66de8c7533c0eea729352c5f5fdd8eee551b424 /src | |
| parent | c65eff23e27dc22b32f5c4b0f0070c8a717b2f5d (diff) | |
| download | emacs-534c20b22f89ffbe99a4d6a1035b74eacc544ee5.tar.gz 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')
| -rw-r--r-- | src/macterm.c | 16 | ||||
| -rw-r--r-- | src/xterm.c | 16 |
2 files changed, 24 insertions, 8 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) | |||
| 4395 | the image. I believe it's looking better if we do | 4395 | the image. I believe it's looking better if we do |
| 4396 | nothing here for mouse-face. */ | 4396 | nothing here for mouse-face. */ |
| 4397 | if (s->hl == DRAW_CURSOR) | 4397 | if (s->hl == DRAW_CURSOR) |
| 4398 | mac_draw_rectangle (s->display, s->window, s->gc, x, y, | 4398 | { |
| 4399 | s->img->width - 1, s->img->height - 1); | 4399 | int r = s->img->relief; |
| 4400 | if (r < 0) r = -r; | ||
| 4401 | mac_draw_rectangle (s->display, s->window, s->gc, x - r, y - r, | ||
| 4402 | s->img->width + r*2 - 1, s->img->height + r*2 - 1); | ||
| 4403 | } | ||
| 4400 | } | 4404 | } |
| 4401 | } | 4405 | } |
| 4402 | else | 4406 | else |
| @@ -4514,8 +4518,12 @@ x_draw_image_foreground_1 (s, pixmap) | |||
| 4514 | the image. I believe it's looking better if we do | 4518 | the image. I believe it's looking better if we do |
| 4515 | nothing here for mouse-face. */ | 4519 | nothing here for mouse-face. */ |
| 4516 | if (s->hl == DRAW_CURSOR) | 4520 | if (s->hl == DRAW_CURSOR) |
| 4517 | mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x, y, | 4521 | { |
| 4518 | s->img->width - 1, s->img->height - 1); | 4522 | int r = s->img->relief; |
| 4523 | if (r < 0) r = -r; | ||
| 4524 | mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x - r, y - r, | ||
| 4525 | s->img->width + r*2 - 1, s->img->height + r*2 - 1); | ||
| 4526 | } | ||
| 4519 | } | 4527 | } |
| 4520 | } | 4528 | } |
| 4521 | else | 4529 | else |
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) | |||
| 4116 | the image. I believe it's looking better if we do | 4116 | the image. I believe it's looking better if we do |
| 4117 | nothing here for mouse-face. */ | 4117 | nothing here for mouse-face. */ |
| 4118 | if (s->hl == DRAW_CURSOR) | 4118 | if (s->hl == DRAW_CURSOR) |
| 4119 | XDrawRectangle (s->display, s->window, s->gc, x, y, | 4119 | { |
| 4120 | s->img->width - 1, s->img->height - 1); | 4120 | int r = s->img->relief; |
| 4121 | if (r < 0) r = -r; | ||
| 4122 | XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, | ||
| 4123 | s->img->width + r*2 - 1, s->img->height + r*2 - 1); | ||
| 4124 | } | ||
| 4121 | } | 4125 | } |
| 4122 | } | 4126 | } |
| 4123 | else | 4127 | else |
| @@ -4232,8 +4236,12 @@ x_draw_image_foreground_1 (s, pixmap) | |||
| 4232 | the image. I believe it's looking better if we do | 4236 | the image. I believe it's looking better if we do |
| 4233 | nothing here for mouse-face. */ | 4237 | nothing here for mouse-face. */ |
| 4234 | if (s->hl == DRAW_CURSOR) | 4238 | if (s->hl == DRAW_CURSOR) |
| 4235 | XDrawRectangle (s->display, pixmap, s->gc, x, y, | 4239 | { |
| 4236 | s->img->width - 1, s->img->height - 1); | 4240 | int r = s->img->relief; |
| 4241 | if (r < 0) r = -r; | ||
| 4242 | XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, | ||
| 4243 | s->img->width + r*2 - 1, s->img->height + r*2 - 1); | ||
| 4244 | } | ||
| 4237 | } | 4245 | } |
| 4238 | } | 4246 | } |
| 4239 | else | 4247 | else |