From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 20 11:45:49 2014 Received: (at submit) by debbugs.gnu.org; 20 Aug 2014 15:45:49 +0000 Received: from localhost ([127.0.0.1]:48329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK856-0008Vz-D1 for submit@debbugs.gnu.org; Wed, 20 Aug 2014 11:45:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51846) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK5LU-0004Bo-FV for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK5LO-00072S-E8 for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:50:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK5LO-00072E-Aw for submit@debbugs.gnu.org; Wed, 20 Aug 2014 08:50:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK5LN-0006Du-Ds for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2014 08:50:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK5LM-0006z7-K6 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2014 08:50:25 -0400 Received: from mail-yk0-x22c.google.com ([2607:f8b0:4002:c07::22c]:35642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK5LM-0006xX-Fk for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2014 08:50:24 -0400 Received: by mail-yk0-f172.google.com with SMTP id 10so6570132ykt.3 for ; Wed, 20 Aug 2014 05:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=E5COYmGifx23A2XoVflsxiklcHC3xhrO4N5In7dXYqI=; b=xbWDVtYAA6gOSzGLyhgzKV0rSXRbfpTzhs4Tr4maj6JbLJamg7HEMOZaRO93jpMr3e dk0m7ltPZ+6cPw84QRDkpUzkt/Z6AFKiGm9UtSX1CCukB3mjc7ULZAIoRoCA/6RdVMvR 1nt6EuE4GQR3oMfAM8ytWYtqEMlmP3Q1G8EAyLur+4w2UjXJEryxFMzK9mEdZR5sRA4q /DXAmOQ0XM38pwl67HIw9zeuRTfMqzeA4rkHU6v0ORJ0CNTFKIddpyc8N7JtXV/pZ94S HjQX31+PJnohWcMLv9QhPOU8l6ESJpJtFpW+aHdyEKeN4/OSS2JRoNfJOcYKQsVy59hp gshw== X-Received: by 10.236.102.70 with SMTP id c46mr233666yhg.194.1408539023315; Wed, 20 Aug 2014 05:50:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.100.65 with HTTP; Wed, 20 Aug 2014 05:50:03 -0700 (PDT) From: Paulie Pena IV Date: Wed, 20 Aug 2014 08:50:03 -0400 Message-ID: Subject: Drag and Drop fails when Emacs window/frame is above top To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=20cf301af45323189505010f0cce X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 20 Aug 2014 11:45:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --20cf301af45323189505010f0cce Content-Type: text/plain; charset=UTF-8 If my Emacs window is above the top of my screen (which is how I usually have it since I don't care about the title bar, etc.), I cannot drag a file onto the top part of the Emacs window/frame. If I try to, I get this error: Not an in-range integer, float, or cons of integers I traced the problem to the "XdndPosition" cond in x-dnd-handle-xdnd, which calls x-send-client-message. The "list-to-send" variable has a negative y value, which it gets from x-dnd-get-drop-x-y. I think the way to fix this is to change x-send-client-message so it accepts negative x/y values, but I'm not sure if that's correct. Thanks, Paulie --20cf301af45323189505010f0cce Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
If my Emacs window is above the top of my screen (which is= how I usually have it since I don't care about the title bar, etc.), I= cannot drag a file onto the top part of the Emacs window/frame. If I try t= o, I get this error:
Not an in-range integer, float, or cons of integers

I traced the problem to the "XdndPosition" cond in=C2=A0x-d= nd-handle-xdnd, which calls=C2=A0x-send-client-message. The "list-to-s= end" variable has a negative y value, which it gets from=C2=A0x-dnd-ge= t-drop-x-y. I think the way to fix this is to change x-send-client-message = so it accepts negative x/y values, but I'm not sure if that's corre= ct.

Thanks,
Paulie
--20cf301af45323189505010f0cce-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 07 13:33:07 2014 Received: (at 18303-done) by debbugs.gnu.org; 7 Sep 2014 17:33:07 +0000 Received: from localhost ([127.0.0.1]:32972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQgKp-0004FM-30 for submit@debbugs.gnu.org; Sun, 07 Sep 2014 13:33:07 -0400 Received: from mailfe06.swip.net ([212.247.154.161]:38628 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQgKm-0004Em-D8 for 18303-done@debbugs.gnu.org; Sun, 07 Sep 2014 13:33:05 -0400 X-T2-Spam-Status: No, hits=0.0 required=5.0 Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 527726996; Sun, 07 Sep 2014 19:32:57 +0200 Message-ID: <540C96C9.9030108@swipnet.se> Date: Sun, 07 Sep 2014 19:32:57 +0200 From: =?UTF-8?B?SmFuIERqw6Rydg==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Paulie Pena IV , 18303-done@debbugs.gnu.org Subject: Re: bug#18303: Drag and Drop fails when Emacs window/frame is above top References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18303-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Den 2014-08-20 14:50, Paulie Pena IV skrev: > If my Emacs window is above the top of my screen (which is how I usually have > it since I don't care about the title bar, etc.), I cannot drag a file onto > the top part of the Emacs window/frame. If I try to, I get this error: > Not an in-range integer, float, or cons of integers > > I traced the problem to the "XdndPosition" cond in x-dnd-handle-xdnd, which > calls x-send-client-message. The "list-to-send" variable has a negative y > value, which it gets from x-dnd-get-drop-x-y. I think the way to fix this is > to change x-send-client-message so it accepts negative x/y values, but I'm not > sure if that's correct. This has been fixed in the trunk. x-send-client-message accepted negative x, but did not accept negative y. Jan D. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 07 15:50:59 2014 Received: (at 18303) by debbugs.gnu.org; 7 Sep 2014 19:50:59 +0000 Received: from localhost ([127.0.0.1]:33016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQiUF-0007dg-Cl for submit@debbugs.gnu.org; Sun, 07 Sep 2014 15:50:59 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:58807) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQiUC-0007dT-Vr for 18303@debbugs.gnu.org; Sun, 07 Sep 2014 15:50:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 07CDAA60005; Sun, 7 Sep 2014 12:50:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q4S0YvTPDQEq; Sun, 7 Sep 2014 12:50:42 -0700 (PDT) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 5ED5A39E8012; Sun, 7 Sep 2014 12:50:42 -0700 (PDT) Message-ID: <540CB70E.30206@cs.ucla.edu> Date: Sun, 07 Sep 2014 12:50:38 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: =?UTF-8?B?SmFuIERqw6Rydg==?= Subject: Re: Drag and Drop fails when Emacs window/frame is above top Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 18303 Cc: 18303@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Thanks for the patch. I noticed that '(v1 << 16) | v2' wouldn't work as desired when v2 < 0, though, as v2's sign bits will bleed into v1's encoded value. I installed an attempt at a fix as trunk bzr 117836. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 02:53:34 2014 Received: (at 18303) by debbugs.gnu.org; 8 Sep 2014 06:53:34 +0000 Received: from localhost ([127.0.0.1]:33180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQspR-0001CQ-Ig for submit@debbugs.gnu.org; Mon, 08 Sep 2014 02:53:33 -0400 Received: from mailfe02.swip.net ([212.247.154.33]:54965 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQspP-0001CC-Hr for 18303@debbugs.gnu.org; Mon, 08 Sep 2014 02:53:32 -0400 X-T2-Spam-Status: No, hits=0.0 required=5.0 Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 530845416; Mon, 08 Sep 2014 07:04:55 +0200 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Drag and Drop fails when Emacs window/frame is above top From: =?iso-8859-1?Q?Jan_Dj=E4rv?= In-Reply-To: <540CB70E.30206@cs.ucla.edu> Date: Mon, 8 Sep 2014 07:04:54 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <540CB70E.30206@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.1878.6) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18303 Cc: 18303@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello. 7 sep 2014 kl. 21:50 skrev Paul Eggert : > Thanks for the patch. I noticed that '(v1 << 16) | v2' wouldn't work = as desired when v2 < 0, though, as v2's sign bits will bleed into v1's = encoded value. I installed an attempt at a fix as trunk bzr 117836. Thanks, but it does not look right. We can assume v1 and v2 are 16 bit = signed integers (X coordinates). In general, when data is a CONS, it = must be two 16 bit numbers. So (v1 << 16) | v2 is just a way of stuffing two signed 16 bits into 32 = bits. But when v2 is long, (v2 & 0xffff) looses the sign bit, as the code is = now. I don't know why the range X_LONG_(MIN|MAX) >> 16 is relevant here, it = is way too large. Remember, val can only be 32 bit, so X_LONG_MAX >> 16 can in it self be = 48 bits. Maybe just convert v1 and v2 to two signed 16 bit numbers (int16_t?) and = shift? Jan D. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 09:10:50 2014 Received: (at 18303) by debbugs.gnu.org; 8 Sep 2014 13:10:50 +0000 Received: from localhost ([127.0.0.1]:33396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQyiY-0002zs-1B for submit@debbugs.gnu.org; Mon, 08 Sep 2014 09:10:50 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:59761) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQyiU-0002zb-R6 for 18303@debbugs.gnu.org; Mon, 08 Sep 2014 09:10:47 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1F54EA6001E; Mon, 8 Sep 2014 06:10:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RI01hy3x6vKi; Mon, 8 Sep 2014 06:10:36 -0700 (PDT) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 21228A60014; Mon, 8 Sep 2014 06:10:36 -0700 (PDT) Message-ID: <540DAAC7.7040602@cs.ucla.edu> Date: Mon, 08 Sep 2014 06:10:31 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: =?UTF-8?B?SmFuIERqw6Rydg==?= Subject: Re: Drag and Drop fails when Emacs window/frame is above top References: <540CB70E.30206@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 18303 Cc: 18303@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.8 (----) Jan Djärv wrote: > Thanks, but it does not look right. We can assume v1 and v2 are 16 bit signed integers (X coordinates). In general, when data is a CONS, it must be two 16 bit numbers. > So (v1 << 16) | v2 is just a way of stuffing two signed 16 bits into 32 bits. > But when v2 is long, (v2 & 0xffff) looses the sign bit, as the code is now. I don't see how the expression could keep the sign bit and still work. Suppose v1 == 27 and v2 == -1. Then ((v1 << 16) | v2) == -1, and we've lost all information about v1's value. In contrast, ((v1 << 16) | (v2 & 0xffff) == 1835007 == 0x1bffff, so we still can retrieve information about v1's value by shifting this value right by 16 bits. > I don't know why the range X_LONG_(MIN|MAX) >> 16 is relevant here, it is way too large. > Remember, val can only be 32 bit, so X_LONG_MAX >> 16 can in it self be 48 bits. X_LONG_MAX and X_LONG_MIN are always 32-bit values, even on platforms where long is 64 bits. So the range X_LONG_MIN >> 16 .. X_LONG_MAX >> 16 is -32768 .. 32767 which should be the correct range for X. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 11:18:51 2014 Received: (at 18303) by debbugs.gnu.org; 8 Sep 2014 15:18:52 +0000 Received: from localhost ([127.0.0.1]:33982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XR0iR-0007O4-3R for submit@debbugs.gnu.org; Mon, 08 Sep 2014 11:18:51 -0400 Received: from mailfe03.swip.net ([212.247.154.65]:57159 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XR0iN-0007Nk-7o for 18303@debbugs.gnu.org; Mon, 08 Sep 2014 11:18:48 -0400 X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 363292403; Mon, 08 Sep 2014 17:18:39 +0200 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Drag and Drop fails when Emacs window/frame is above top From: =?iso-8859-1?Q?Jan_Dj=E4rv?= In-Reply-To: <540DAAC7.7040602@cs.ucla.edu> Date: Mon, 8 Sep 2014 17:18:38 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <540CB70E.30206@cs.ucla.edu> <540DAAC7.7040602@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.1878.6) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18303 Cc: 18303@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello. 8 sep 2014 kl. 15:10 skrev Paul Eggert : > Jan Dj=E4rv wrote: >> Thanks, but it does not look right. We can assume v1 and v2 are 16 = bit signed integers (X coordinates). In general, when data is a CONS, = it must be two 16 bit numbers. >> So (v1 << 16) | v2 is just a way of stuffing two signed 16 bits into = 32 bits. >> But when v2 is long, (v2 & 0xffff) looses the sign bit, as the code = is now. >=20 > I don't see how the expression could keep the sign bit and still work. = Suppose v1 =3D=3D 27 and v2 =3D=3D -1. Then ((v1 << 16) | v2) =3D=3D = -1, and we've lost all information about v1's value. In contrast, ((v1 = << 16) | (v2 & 0xffff) =3D=3D 1835007 =3D=3D 0x1bffff, so we still can = retrieve information about v1's value by shifting this value right by 16 = bits. >=20 Yes, you are right. >> I don't know why the range X_LONG_(MIN|MAX) >> 16 is relevant here, = it is way too large. >> Remember, val can only be 32 bit, so X_LONG_MAX >> 16 can in it self = be 48 bits. >=20 > X_LONG_MAX and X_LONG_MIN are always 32-bit values, even on platforms = where long is 64 bits. So the range X_LONG_MIN >> 16 .. X_LONG_MAX >> = 16 is -32768 .. 32767 which should be the correct range for X. Right, I missed the X_. Jan D. From unknown Fri Aug 15 20:27:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Oct 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator