From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45277: DND errors Date: Mon, 21 Dec 2020 10:59:09 +0200 Organization: LINKOV.NET Message-ID: <87eejjh6pf.fsf_-_@mail.linkov.net> References: <87zh2dijdl.fsf@mail.linkov.net> <874kkkz3a9.fsf@gmx.de> <87lfdwhzek.fsf@mail.linkov.net> <87pn37xvkv.fsf@gmx.de> <877dpcp9yg.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10447"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 45277@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 21 10:05:33 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krH8H-0002b3-AA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Dec 2020 10:05:33 +0100 Original-Received: from localhost ([::1]:53472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krH8G-0005We-11 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Dec 2020 04:05:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krH7m-0005WD-Aw for bug-gnu-emacs@gnu.org; Mon, 21 Dec 2020 04:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krH7m-00008z-3g for bug-gnu-emacs@gnu.org; Mon, 21 Dec 2020 04:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1krH7l-0003xp-Uc for bug-gnu-emacs@gnu.org; Mon, 21 Dec 2020 04:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Dec 2020 09:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45277 X-GNU-PR-Package: emacs Original-Received: via spool by 45277-submit@debbugs.gnu.org id=B45277.160854148215202 (code B ref 45277); Mon, 21 Dec 2020 09:05:01 +0000 Original-Received: (at 45277) by debbugs.gnu.org; 21 Dec 2020 09:04:42 +0000 Original-Received: from localhost ([127.0.0.1]:46261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krH7S-0003x7-1u for submit@debbugs.gnu.org; Mon, 21 Dec 2020 04:04:42 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:40975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krH7P-0003wq-DB; Mon, 21 Dec 2020 04:04:40 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0C22E6000E; Mon, 21 Dec 2020 09:04:31 +0000 (UTC) In-Reply-To: <877dpcp9yg.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 20 Dec 2020 22:01:20 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196528 Archived-At: 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