* 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.
(cherry picked from commit
d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a)
touch-screen-word-select-bounds nil)
(push-mark point)
(goto-char point)
- (activate-mark))
+ (activate-mark)
+ (setq deactivate-mark nil))
;; Start word selection by trying to obtain the position
;; around point.
(let ((word-start nil)
touch-screen-word-select-initial-word nil)
(push-mark point)
(goto-char point)
- (activate-mark))
+ (activate-mark)
+ (setq deactivate-mark nil))
;; Otherwise, select the word. Move point to either the
;; end or the start of the word, depending on which is
;; closer to EVENT.
(progn
(push-mark word-start)
(activate-mark)
+ (setq deactivate-mark nil)
(goto-char word-end))
(progn
(push-mark word-end)
(activate-mark)
+ (setq deactivate-mark nil)
(goto-char word-start)))
;; Record the bounds of the selected word.
(setq touch-screen-word-select-bounds
;; Display a preview of the line now around
;; point if requested by the user.
(when touch-screen-preview-select
- (touch-screen-preview-select))))))))))))))
+ (touch-screen-preview-select)))))))))))
+ (setq deactivate-mark nil))))
(defun touch-screen-restart-drag (event)
"Restart dragging to select text.
:background "dim gray"
:box (:line-width (1 . -1) :color "gray46")
:extend t)
+ ;; Monochrome displays.
+ (((background light))
+ :background "white"
+ :box (:line-width (1 . -1) :color "black")
+ :extend t)
+ (((background dark))
+ :background "black"
+ :box (:line-width (1 . -1) :color "white")
+ :extend t)
(t
:slant italic
:extend t))
"Face used for editable fields."
:group 'widget-faces
- :version "28.1")
+ :version "30.1")
(defface widget-single-line-field '((((type tty))
:background "green3"
(((class grayscale color)
(background dark))
:background "dim gray")
+ ;; Monochrome displays.
+ (((background light))
+ :stipple "gray3"
+ :extend t)
(t
:slant italic))
"Face used for editable fields spanning only a single line."
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
- return Qt;
+ struct android_display_info *dpyinfo;
+
+ dpyinfo = check_android_display_info (terminal);
+ return dpyinfo->n_planes > 8 ? Qt : Qnil;
}
DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p,
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
- return Qnil;
+ struct android_display_info *dpyinfo;
+
+ dpyinfo = check_android_display_info (terminal);
+ return (dpyinfo->n_planes > 1 && dpyinfo->n_planes <= 8
+ ? Qt : Qnil);
}
DEFUN ("x-display-pixel-width", Fx_display_pixel_width,
}
}
- /* Search bitmap-file-path for the file, if appropriate. */
- if (openp (Vx_bitmap_file_path, file, Qnil, &found,
- make_fixnum (R_OK), false, false, NULL)
- < 0)
+ /* Search bitmap-file-path for the file, if appropriate. If no file
+ extension or directory is specified and no file by this name
+ exists, append the extension ".xbm" and retry. */
+ if ((openp (Vx_bitmap_file_path, file, Qnil, &found,
+ make_fixnum (R_OK), false, false, NULL) < 0)
+ && (NILP (Fequal (Ffile_name_nondirectory (file), file))
+ || strrchr (SSDATA (file), '.')
+ || (openp (Vx_bitmap_file_path,
+ CALLN (Fconcat, file, build_string (".xbm")),
+ Qnil, &found, make_fixnum (R_OK), false, false,
+ NULL) < 0)))
return -1;
if (!STRINGP (image_find_image_fd (file, &fd))