Function: x-dnd-get-drop-rectangle
x-dnd-get-drop-rectangle is a byte-compiled function defined in
x-dnd.el.gz.
Signature
(x-dnd-get-drop-rectangle WINDOW POSN)
Documentation
Return the drag-and-drop rectangle at POSN on WINDOW.
Source Code
;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-get-drop-rectangle (window posn)
"Return the drag-and-drop rectangle at POSN on WINDOW."
(if (or dnd-scroll-margin
(not (windowp window))
;; Drops on the scroll bar aren't allowed, but the mouse
;; rectangle can be set while still on the scroll bar,
;; causing the drag initiator to never send an XdndPosition
;; event that will an XdndStatus message with the accept
;; flag set to be set, even after the mouse enters the
;; window text area. To prevent that, simply don't generate
;; a mouse rectangle when an area is set.
(posn-area posn))
'(0 0 0 0)
(let ((window-rectangle (x-dnd-get-window-rectangle window))
object-rectangle)
(when dnd-indicate-insertion-point
(setq object-rectangle (x-dnd-get-object-rectangle window posn)
window-rectangle (x-dnd-intersect-rectangles object-rectangle
window-rectangle)))
window-rectangle)))