]> git.eshelyaron.com Git - emacs.git/commit
Adapt doc-view-set-slice-using-mouse to touch-screen input
authorPo Lu <luangruo@yahoo.com>
Wed, 3 Jul 2024 09:05:24 +0000 (17:05 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 3 Jul 2024 18:46:25 +0000 (20:46 +0200)
commita96722e614a4538719da1020f08ec44a4c7c4d83
tree8e5b5c93bbf7dab1920332f24baa98d250dedbaa
parent06aa174f925e8679d892b4b8d8224c90806e830c
Adapt doc-view-set-slice-using-mouse to touch-screen input

* doc/lispref/commands.texi (Touchscreen Events): Document means
of unconditionally enabling simple conversion.

* lisp/doc-view.el (doc-view-set-slice-using-mouse): Bind
touch-screen-simple-mouse-conversion to t, and read translated
mouse events with read-key rather than read-event.

* lisp/subr.el (read-key): Don't permit idle timer to interfere
with reporting of translated mouse events.

* lisp/touch-screen.el (touch-screen-simple-mouse-conversion):
New variable.
(touch-screen-handle-point-up, touch-screen-handle-touch):
Unconditionally enable `mouse-drag' translation if set.  Decide
whether to send drag or mouse events by the values of the two
touchpoints' XY positions and point and double-click-fuzz, as in
make_lispy_event.

(cherry picked from commit 65bd41d1cf6d8ea6b95b69d9c60b0111a1c33392)
doc/lispref/commands.texi
lisp/doc-view.el
lisp/subr.el
lisp/touch-screen.el