diff options
| author | Kim F. Storm | 2006-09-10 00:10:46 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-09-10 00:10:46 +0000 |
| commit | d75a48427cc8728476a493fa44594bb598aaec40 (patch) | |
| tree | fbb6a675fad9fb473cc68b31568898390ba586eb /src | |
| parent | 1d7b95f595913a8b3d42841ca6304f9e49f046bb (diff) | |
| download | emacs-d75a48427cc8728476a493fa44594bb598aaec40.tar.gz emacs-d75a48427cc8728476a493fa44594bb598aaec40.zip | |
(get_window_cursor_type): Use hollow cursor on
non-transparent images.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 0a516c39768..dbc416afd9a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21248,14 +21248,16 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 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 | } |