diff options
| author | Po Lu | 2024-04-24 11:42:48 +0800 |
|---|---|---|
| committer | Po Lu | 2024-04-24 11:42:48 +0800 |
| commit | d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a (patch) | |
| tree | f443cb0d7b45bc867f820cc70966be7280a1c03d /src/androidfns.c | |
| parent | d8d4fd8c6dbe11542432fccdc31701da9f686460 (diff) | |
| download | emacs-d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a.tar.gz emacs-d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a.zip | |
Miscellaneous fixes for Android port
* lisp/touch-screen.el (touch-screen-hold, touch-screen-drag):
Clear deactivate-mark if the mark is activated to prevent undue
deactivation after completion.
* lisp/wid-edit.el (widget-field, widget-single-line-field):
Insert specifications suitable for monochrome displays.
* src/androidfns.c (Fxw_display_color_p, Fx_display_grayscale_p):
Report color and/or grayscale properly.
* src/image.c (image_create_bitmap_from_file)
[HAVE_ANDROID]: If a file with no extension cannot be located,
append .xbm and retry.
Diffstat (limited to 'src/androidfns.c')
| -rw-r--r-- | src/androidfns.c | 11 |
1 files changed, 9 insertions, 2 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, |