comparison src/xdisp.c @ 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 f6b18b9949d1
children 526dc1f36b09 a1a25ac6c88a
comparison
equal deleted inserted replaced
72765:d46f55287c80 72766:d9b9b3999dc8
21246 if (glyph != NULL && glyph->type == IMAGE_GLYPH) 21246 if (glyph != NULL && glyph->type == IMAGE_GLYPH)
21247 { 21247 {
21248 if (cursor_type == FILLED_BOX_CURSOR) 21248 if (cursor_type == FILLED_BOX_CURSOR)
21249 { 21249 {
21250 /* Using a block cursor on large images can be very annoying. 21250 /* Using a block cursor on large images can be very annoying.
21251 So use a hollow cursor for "large" images. */ 21251 So use a hollow cursor for "large" images.
21252 If image is not transparent (no mask), also use hollow cursor. */
21252 struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); 21253 struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id);
21253 if (img != NULL && IMAGEP (img->spec)) 21254 if (img != NULL && IMAGEP (img->spec))
21254 { 21255 {
21255 /* Arbitrarily, interpret "Large" as >32x32 and >NxN 21256 /* Arbitrarily, interpret "Large" as >32x32 and >NxN
21256 where N = size of default frame font size. 21257 where N = size of default frame font size.
21257 This should cover most of the "tiny" icons people may use. */ 21258 This should cover most of the "tiny" icons people may use. */
21258 if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w)) 21259 if (!img->mask
21260 || img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
21259 || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w))) 21261 || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
21260 cursor_type = HOLLOW_BOX_CURSOR; 21262 cursor_type = HOLLOW_BOX_CURSOR;
21261 } 21263 }
21262 } 21264 }
21263 else if (cursor_type != NO_CURSOR) 21265 else if (cursor_type != NO_CURSOR)