diff src/macterm.c @ 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 cb1679526984
children 9484de301252
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