From: Po Lu Date: Wed, 31 May 2023 02:16:06 +0000 (+0800) Subject: Merge remote-tracking branch 'origin/master' into feature/android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=822463ea5adae0f17bde4246e320800ee02f592d;p=emacs.git Merge remote-tracking branch 'origin/master' into feature/android --- 822463ea5adae0f17bde4246e320800ee02f592d diff --cc lisp/subr.el index b5c59023f8e,cef631a69c3..69f58a8c827 --- a/lisp/subr.el +++ b/lisp/subr.el @@@ -1663,13 -1674,8 +1674,14 @@@ nil or (STRING . POSITION)' `posn-timestamp': The time the event occurred, in milliseconds. For more information, see Info node `(elisp)Click Events'." + (declare (side-effect-free t)) - (or (and (consp event) (nth 1 event)) + (or (and (consp event) + ;; Ignore touchscreen events. They store the posn in a + ;; different format, and can have multiple posns. + (not (memq (car event) '(touchscreen-begin + touchscreen-update + touchscreen-end))) + (nth 1 event)) (event--posn-at-point))) (defun event-end (event) @@@ -1677,11 -1683,8 +1689,12 @@@ EVENT should be a click, drag, or key press event. See `event-start' for a description of the value returned." + (declare (side-effect-free t)) - (or (and (consp event) (nth (if (consp (nth 2 event)) 2 1) event)) + (or (and (consp event) + (not (memq (car event) '(touchscreen-begin + touchscreen-update + touchscreen-end))) + (nth (if (consp (nth 2 event)) 2 1) event)) (event--posn-at-point))) (defsubst event-click-count (event)