diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/androidfns.c | 11 | ||||
| -rw-r--r-- | src/image.c | 15 |
2 files changed, 20 insertions, 6 deletions
diff --git a/src/androidfns.c b/src/androidfns.c index b6df7ae0677..df425e5779e 100644 --- a/src/androidfns.c +++ b/src/androidfns.c | |||
| @@ -1202,7 +1202,10 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, | |||
| 1202 | doc: /* SKIP: real doc in xfns.c. */) | 1202 | doc: /* SKIP: real doc in xfns.c. */) |
| 1203 | (Lisp_Object terminal) | 1203 | (Lisp_Object terminal) |
| 1204 | { | 1204 | { |
| 1205 | return Qt; | 1205 | struct android_display_info *dpyinfo; |
| 1206 | |||
| 1207 | dpyinfo = check_android_display_info (terminal); | ||
| 1208 | return dpyinfo->n_planes > 8 ? Qt : Qnil; | ||
| 1206 | } | 1209 | } |
| 1207 | 1210 | ||
| 1208 | DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, | 1211 | DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, |
| @@ -1210,7 +1213,11 @@ DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, | |||
| 1210 | doc: /* SKIP: real doc in xfns.c. */) | 1213 | doc: /* SKIP: real doc in xfns.c. */) |
| 1211 | (Lisp_Object terminal) | 1214 | (Lisp_Object terminal) |
| 1212 | { | 1215 | { |
| 1213 | return Qnil; | 1216 | struct android_display_info *dpyinfo; |
| 1217 | |||
| 1218 | dpyinfo = check_android_display_info (terminal); | ||
| 1219 | return (dpyinfo->n_planes > 1 && dpyinfo->n_planes <= 8 | ||
| 1220 | ? Qt : Qnil); | ||
| 1214 | } | 1221 | } |
| 1215 | 1222 | ||
| 1216 | DEFUN ("x-display-pixel-width", Fx_display_pixel_width, | 1223 | DEFUN ("x-display-pixel-width", Fx_display_pixel_width, |
diff --git a/src/image.c b/src/image.c index d1faadee968..74249b8d465 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -957,10 +957,17 @@ image_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 957 | } | 957 | } |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | /* Search bitmap-file-path for the file, if appropriate. */ | 960 | /* Search bitmap-file-path for the file, if appropriate. If no file |
| 961 | if (openp (Vx_bitmap_file_path, file, Qnil, &found, | 961 | extension or directory is specified and no file by this name |
| 962 | make_fixnum (R_OK), false, false, NULL) | 962 | exists, append the extension ".xbm" and retry. */ |
| 963 | < 0) | 963 | if ((openp (Vx_bitmap_file_path, file, Qnil, &found, |
| 964 | make_fixnum (R_OK), false, false, NULL) < 0) | ||
| 965 | && (NILP (Fequal (Ffile_name_nondirectory (file), file)) | ||
| 966 | || strrchr (SSDATA (file), '.') | ||
| 967 | || (openp (Vx_bitmap_file_path, | ||
| 968 | CALLN (Fconcat, file, build_string (".xbm")), | ||
| 969 | Qnil, &found, make_fixnum (R_OK), false, false, | ||
| 970 | NULL) < 0))) | ||
| 964 | return -1; | 971 | return -1; |
| 965 | 972 | ||
| 966 | if (!STRINGP (image_find_image_fd (file, &fd)) | 973 | if (!STRINGP (image_find_image_fd (file, &fd)) |