diff src/xterm.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 cc9283570d1b
children adebb58b0c5e
line wrap: on
line diff
--- 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