changeset 72766:d9b9b3999dc8

(get_window_cursor_type): Use hollow cursor on non-transparent images.
author Kim F. Storm <storm@cua.dk>
date Sun, 10 Sep 2006 00:10:46 +0000
parents d46f55287c80
children 803cf0fa741f
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat Sep 09 23:21:57 2006 +0000
+++ b/src/xdisp.c	Sun Sep 10 00:10:46 2006 +0000
@@ -21248,14 +21248,16 @@
 	  if (cursor_type == FILLED_BOX_CURSOR)
 	    {
 	      /* Using a block cursor on large images can be very annoying.
-		 So use a hollow cursor for "large" images.  */
+		 So use a hollow cursor for "large" images.
+		 If image is not transparent (no mask), also use hollow cursor.  */
 	      struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id);
 	      if (img != NULL && IMAGEP (img->spec))
 		{
 		  /* Arbitrarily, interpret "Large" as >32x32 and >NxN
 		     where N = size of default frame font size.
 		     This should cover most of the "tiny" icons people may use.  */
-		  if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
+		  if (!img->mask
+		      || img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
 		      || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
 		    cursor_type = HOLLOW_BOX_CURSOR;
 		}