1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/x-dnd.el (x-dnd-get-drop-x-y): Add safer check for top/left (bug#45277)

This commit is contained in:
Juri Linkov 2020-12-29 21:37:31 +02:00
parent baac3562a6
commit c13937ccb6

View file

@ -411,8 +411,10 @@ 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 (frame-parameter frame 'left))
(frame-top (frame-parameter frame 'top)))
(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