]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/x-dnd.el (x-dnd-get-drop-x-y): Add safer check for top/left (bug#45277)
authorJuri Linkov <juri@linkov.net>
Tue, 29 Dec 2020 19:37:31 +0000 (21:37 +0200)
committerJuri Linkov <juri@linkov.net>
Tue, 29 Dec 2020 19:37:31 +0000 (21:37 +0200)
lisp/x-dnd.el

index 1d49f4625314a4f706b7c25b10bc82aaa6378829..5af549036054be6dc3b0a5b1219bf432290c4238 100644 (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