Function: x-dnd-handle-unsupported-drop

x-dnd-handle-unsupported-drop is a byte-compiled function defined in x-dnd.el.gz.

Signature

(x-dnd-handle-unsupported-drop TARGETS X Y ACTION WINDOW-ID FRAME TIME LOCAL-SELECTION-DATA)

Documentation

Return non-nil if the drop described by TARGETS and ACTION should not proceed.

X and Y are the root window coordinates of the drop. FRAME is the frame the drop originated on. WINDOW-ID is the X window the drop should happen to. LOCAL-SELECTION-DATA is the local selection data of the drop.

Source Code

;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-handle-unsupported-drop (targets x y action window-id frame _time local-selection-data)
  "Return non-nil if the drop described by TARGETS and ACTION should not proceed.
X and Y are the root window coordinates of the drop.
FRAME is the frame the drop originated on.
WINDOW-ID is the X window the drop should happen to.
LOCAL-SELECTION-DATA is the local selection data of the drop."
  (let ((chosen-action nil))
    (not (and (or (eq action 'XdndActionCopy)
                  (eq action 'XdndActionMove))
              (not (and x-dnd-use-offix-drop local-selection-data
                        (or (not (eq x-dnd-use-offix-drop 'files))
                            (member "FILE_NAME" targets))
                        (when (x-dnd-do-offix-drop targets x
                                                   y frame window-id
                                                   local-selection-data)
                          (setq chosen-action 'XdndActionCopy))))
              (let ((delegate-p (or (member "STRING" targets)
                                    (member "UTF8_STRING" targets)
                                    (member "COMPOUND_TEXT" targets)
                                    (member "TEXT" targets))))
                (prog1 delegate-p
                  ;; A string will avoid the drop emulation done in C
                  ;; code, but won't be returned from `x-begin-drag'.
                  (setq chosen-action (unless delegate-p ""))))))
    chosen-action))