]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_draw_image_foreground, x_draw_image_foreground_1):
authorKim F. Storm <storm@cua.dk>
Wed, 8 May 2002 21:32:00 +0000 (21:32 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 8 May 2002 21:32:00 +0000 (21:32 +0000)
Enlarge cursor rectangle drawn around image with non-zero relief.

src/macterm.c
src/xterm.c

index 5fb67a9a588f89e2c93791ba7b5952c7ab78435d..15a63c58bd2aef01906c14b828f608791dece6f2 100644 (file)
@@ -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
index d66f719fc9f0be54a79105eefadb612815878cfb..c87d8981daf06147b8af30d44c61456a9842510d 100644 (file)
@@ -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