From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#18303: Drag and Drop fails when Emacs window/frame is above top Date: Mon, 8 Sep 2014 17:18:38 +0200 Message-ID: References: <540CB70E.30206@cs.ucla.edu> <540DAAC7.7040602@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1410189567 8349 80.91.229.3 (8 Sep 2014 15:19:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2014 15:19:27 +0000 (UTC) Cc: 18303@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 08 17:19:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XR0is-0008JK-0z for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 17:19:18 +0200 Original-Received: from localhost ([::1]:44166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR0ir-0007qV-Gz for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 11:19:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR0ii-0007lp-9H for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 11:19:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XR0ic-0004yc-DD for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 11:19:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR0ic-0004yU-B2 for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 11:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XR0ib-0007OT-QC for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 11:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Sep 2014 15:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18303-submit@debbugs.gnu.org id=B18303.141018953228405 (code B ref 18303); Mon, 08 Sep 2014 15:19:01 +0000 Original-Received: (at 18303) by debbugs.gnu.org; 8 Sep 2014 15:18:52 +0000 Original-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 Original-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 Original-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 In-Reply-To: <540DAAC7.7040602@cs.ucla.edu> X-Mailer: Apple Mail (2.1878.6) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93156 Archived-At: 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.