Function: touch-screen-last-drag-position
touch-screen-last-drag-position is an autoloaded and byte-compiled
function defined in touch-screen.el.gz.
Signature
(touch-screen-last-drag-position)
Documentation
Return the last attested position of the current touch screen tool.
Value is a pair of integers (X . Y) representing the pixel
position of the said tool relative to the frame where it was
placed (not the selected frame), or nil if this function was
not invoked after the generation of a mouse-movement or
down-mouse-1 event by touch screen event translation.
This function must be consulted in preference to
mouse-absolute-pixel-position if the latter is required in any
command that handles mouse-movement or down-mouse-1 events.
Source Code
;; Defined in /usr/src/emacs/lisp/touch-screen.el.gz
;;;###autoload
(defun touch-screen-last-drag-position ()
"Return the last attested position of the current touch screen tool.
Value is a pair of integers (X . Y) representing the pixel
position of the said tool relative to the frame where it was
placed (not the selected frame), or nil if this function was
not invoked after the generation of a `mouse-movement' or
`down-mouse-1' event by touch screen event translation.
This function must be consulted in preference to
`mouse-absolute-pixel-position' if the latter is required in any
command that handles `mouse-movement' or `down-mouse-1' events."
(when-let* ((tool touch-screen-current-tool)
(window (nth 1 tool))
(pos (nth 10 tool)))
(and (eq (nth 3 tool) 'mouse-drag)
(window-live-p window) pos)))