From: Juri Linkov Date: Tue, 29 Dec 2020 19:37:31 +0000 (+0200) Subject: * lisp/x-dnd.el (x-dnd-get-drop-x-y): Add safer check for top/left (bug#45277) X-Git-Tag: emacs-28.0.90~4501 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c13937ccb6c9ebf7a1dd9eaa7eb6bb3768409093;p=emacs.git * lisp/x-dnd.el (x-dnd-get-drop-x-y): Add safer check for top/left (bug#45277) --- diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 1d49f462531..5af54903605 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -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