Function: touch-screen-inhibit-drag

touch-screen-inhibit-drag is an autoloaded and byte-compiled function defined in touch-screen.el.gz.

Signature

(touch-screen-inhibit-drag)

Documentation

Inhibit subsequent touchscreen-drag events from being sent.

Prevent touchscreen-drag and translated mouse events from being sent until the touch sequence currently being translated ends. Must be called from a command bound to a touchscreen-hold or touchscreen-drag event.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/touch-screen.el.gz
;;; Event handling exports.  These functions are intended for use by
;;; Lisp commands bound to touch screen gesture events.

;;;###autoload
(defun touch-screen-inhibit-drag ()
  "Inhibit subsequent `touchscreen-drag' events from being sent.
Prevent `touchscreen-drag' and translated mouse events from being
sent until the touch sequence currently being translated ends.
Must be called from a command bound to a `touchscreen-hold' or
`touchscreen-drag' event."
  (let* ((tool touch-screen-current-tool)
         (current-what (nth 3 tool)))
    ;; Signal an error if no hold and no drag is in progress.
    (when (and (not (eq current-what 'held))
               (not (eq current-what 'drag)))
      (error "Calling `touch-screen-inhibit-drag' outside hold or drag"))
    ;; Now set the fourth element of tool to `command-inhibit'.
    (setcar (nthcdr 3 tool) 'command-inhibit)))