[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45277: DND errors
From: |
Juri Linkov |
Subject: |
bug#45277: DND errors |
Date: |
Mon, 21 Dec 2020 10:59:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
retitle 45277 DND errors
tags 45277 patch
quit
> Here's a test case for DND errors:
>
> Eval:
> (modify-frame-parameters nil '((undecorated . t)))
> (toggle-frame-maximized)
>
> (frame-parameter nil 'left)
> => (+ -1)
>
> Since it's not a number, x-dnd-handle-xdnd signals the error:
>
> Bad data in VALUES, must be number, cons or string
I found that semantic-displayer-point-position checks for such syntax
and copied the same code to x-dnd-get-drop-x-y:
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index 1d49f46253..5af5490360 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -411,8 +411,10 @@ x-dnd-get-drop-x-y
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
- bug#45277: D-Bus crashes and DND errors, (continued)
- bug#45277: D-Bus crashes and DND errors, Michael Albinus, 2020/12/20
- bug#45277: D-Bus crashes and DND errors, Juri Linkov, 2020/12/28
- bug#45277: D-Bus crashes and DND errors, Michael Albinus, 2020/12/28
- bug#45277: D-Bus crashes and DND errors, Juri Linkov, 2020/12/28
- bug#45277: D-Bus crashes and DND errors, Michael Albinus, 2020/12/29
- bug#45277: D-Bus crashes and DND errors, Juri Linkov, 2020/12/29
- bug#45277: D-Bus crashes and DND errors, Michael Albinus, 2020/12/29
- bug#45277: D-Bus crashes and DND errors, Eli Zaretskii, 2020/12/29
- bug#45277: D-Bus crashes and DND errors, Juri Linkov, 2020/12/29
- bug#45277: D-Bus crashes and DND errors, Michael Albinus, 2020/12/30
- bug#45277: DND errors,
Juri Linkov <=