Function: x-dnd-get-drop-x-y
x-dnd-get-drop-x-y is a byte-compiled function defined in x-dnd.el.gz.
Signature
(x-dnd-get-drop-x-y FRAME W)
Documentation
Return the x/y coordinates to be sent in a XDndStatus message.
Coordinates are required to be absolute. FRAME is the frame and W is the window where the drop happened. If W is a window, return its absolute coordinates, otherwise return the frame coordinates.
Source Code
;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-get-drop-x-y (frame w)
"Return the x/y coordinates to be sent in a XDndStatus message.
Coordinates are required to be absolute.
FRAME is the frame and W is the window where the drop happened.
If W is a window, return its absolute coordinates,
otherwise return the frame coordinates."
(let* ((frame-left (or (car-safe (cdr-safe (frame-parameter frame 'left)))
(frame-parameter frame 'left)))
(frame-top (or (car-safe (cdr-safe (frame-parameter frame 'top)))
(frame-parameter frame 'top))))
(if (windowp w)
(let ((edges (window-inside-pixel-edges w)))
(cons
(+ frame-left (nth 0 edges))
(+ frame-top (nth 1 edges))))
(cons frame-left frame-top))))