unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 45277@debbugs.gnu.org
Subject: bug#45277: DND errors
Date: Mon, 21 Dec 2020 10:59:09 +0200	[thread overview]
Message-ID: <87eejjh6pf.fsf_-_@mail.linkov.net> (raw)
In-Reply-To: <877dpcp9yg.fsf@mail.linkov.net> (Juri Linkov's message of "Sun,  20 Dec 2020 22:01:20 +0200")

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





      parent reply	other threads:[~2020-12-21  8:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 20:58 bug#45277: D-Bus crashes and DND errors Juri Linkov
2020-12-17 18:38 ` Michael Albinus
2020-12-17 21:54   ` Juri Linkov
2020-12-18 10:22     ` Michael Albinus
2020-12-19 20:23       ` Juri Linkov
2020-12-20 20:01       ` Juri Linkov
2020-12-20 20:21         ` Michael Albinus
2020-12-28 17:03           ` Juri Linkov
2020-12-28 17:52             ` Michael Albinus
2020-12-28 18:19               ` Juri Linkov
2020-12-29  8:27                 ` Michael Albinus
2020-12-29  9:31                   ` Juri Linkov
2020-12-29 10:59                     ` Michael Albinus
2020-12-29 15:16                       ` Eli Zaretskii
2020-12-29 19:28                         ` Juri Linkov
2020-12-30 10:21                           ` Michael Albinus
2021-01-06 17:37                             ` bug#45277: SELECTION_CLEAR_EVENT crashes Juri Linkov
2021-05-16 15:52                               ` Lars Ingebrigtsen
2021-05-16 17:57                                 ` Juri Linkov
2021-05-17 14:03                                   ` Lars Ingebrigtsen
2021-07-13 20:49                                     ` Juri Linkov
2021-07-13 22:28                                       ` Juri Linkov
2021-07-13 22:34                                       ` Lars Ingebrigtsen
2020-12-21  8:59         ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eejjh6pf.fsf_-_@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=45277@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).