[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c,v |
Date: |
Sun, 27 Aug 2006 22:23:08 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 06/08/27 22:23:07
Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1114
retrieving revision 1.1115
diff -u -b -r1.1114 -r1.1115
--- xdisp.c 24 Aug 2006 20:51:17 -0000 1.1114
+++ xdisp.c 27 Aug 2006 22:23:07 -0000 1.1115
@@ -21213,10 +21213,31 @@
/* Use normal cursor if not blinked off. */
if (!w->cursor_off_p)
{
- if (glyph != NULL && glyph->type == IMAGE_GLYPH) {
+ if (glyph != NULL && glyph->type == IMAGE_GLYPH)
+ {
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. */
+ 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))
+ || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
cursor_type = HOLLOW_BOX_CURSOR;
}
+ }
+ else if (cursor_type != NO_CURSOR)
+ {
+ /* Display current only supports BOX and HOLLOW cursors for
images.
+ So for now, unconditionally use a HOLLOW cursor when cursor is
+ not a solid box cursor. */
+ cursor_type = HOLLOW_BOX_CURSOR;
+ }
+ }
return cursor_type;
}