diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 038b8e53669..e41ceaf0bb7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -30884,26 +30884,28 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, | |||
| 30884 | if (!w->cursor_off_p) | 30884 | if (!w->cursor_off_p) |
| 30885 | { | 30885 | { |
| 30886 | if (glyph != NULL && glyph->type == XWIDGET_GLYPH) | 30886 | if (glyph != NULL && glyph->type == XWIDGET_GLYPH) |
| 30887 | return NO_CURSOR; | 30887 | return NO_CURSOR; |
| 30888 | if (glyph != NULL && glyph->type == IMAGE_GLYPH) | 30888 | if (glyph != NULL && glyph->type == IMAGE_GLYPH) |
| 30889 | { | 30889 | { |
| 30890 | if (cursor_type == FILLED_BOX_CURSOR) | 30890 | if (cursor_type == FILLED_BOX_CURSOR) |
| 30891 | { | 30891 | { |
| 30892 | /* Using a block cursor on large images can be very annoying. | 30892 | /* Using a block cursor on large images can be very |
| 30893 | So use a hollow cursor for "large" images. | 30893 | annoying. So use a hollow cursor for "large" images. |
| 30894 | If image is not transparent (no mask), also use hollow cursor. */ | 30894 | If image is not transparent (no mask), also use |
| 30895 | hollow cursor. */ | ||
| 30895 | struct image *img = IMAGE_OPT_FROM_ID (f, glyph->u.img_id); | 30896 | struct image *img = IMAGE_OPT_FROM_ID (f, glyph->u.img_id); |
| 30896 | if (img != NULL && IMAGEP (img->spec)) | 30897 | if (img != NULL && IMAGEP (img->spec)) |
| 30897 | { | 30898 | { |
| 30898 | /* Interpret "large" as >SIZExSIZE and >NxN | 30899 | /* Interpret "large" as >SIZExSIZE and >NxN where |
| 30899 | where SIZE is the value from cursor-type in form (box . SIZE), | 30900 | SIZE is the value from cursor-type of the form |
| 30900 | where N = size of default frame font size. | 30901 | (box . SIZE), where N = size of default frame |
| 30901 | So, setting cursor-type to (box . 32) should cover most of | 30902 | font size. So, setting cursor-type to (box . 32) |
| 30902 | the "tiny" icons people may use. */ | 30903 | should cover most of the "tiny" icons people may |
| 30904 | use. */ | ||
| 30903 | if (!img->mask | 30905 | if (!img->mask |
| 30904 | || (CONSP (BVAR (b, cursor_type)) | 30906 | || (CONSP (BVAR (b, cursor_type)) |
| 30905 | && img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w)) | 30907 | && img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w)) |
| 30906 | && img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w)))) | 30908 | && img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w)))) |
| 30907 | cursor_type = HOLLOW_BOX_CURSOR; | 30909 | cursor_type = HOLLOW_BOX_CURSOR; |
| 30908 | } | 30910 | } |
| 30909 | } | 30911 | } |