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 07:04:54 +0200 Message-ID: References: <540CB70E.30206@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=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1410159269 18687 80.91.229.3 (8 Sep 2014 06:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2014 06:54:29 +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 08:54: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 1XQsq9-00081N-SU for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 08:54:18 +0200 Original-Received: from localhost ([::1]:40897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQsq9-0006Cd-Hd for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 02:54:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQsq1-0006Ar-Ab for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 02:54:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQspv-0002Gy-EO for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 02:54:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQspv-0002Gu-B2 for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 02:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XQspu-0001DA-M5 for bug-gnu-emacs@gnu.org; Mon, 08 Sep 2014 02:54:02 -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 06:54:02 +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.14101592144618 (code B ref 18303); Mon, 08 Sep 2014 06:54:02 +0000 Original-Received: (at 18303) by debbugs.gnu.org; 8 Sep 2014 06:53:34 +0000 Original-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 Original-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 Original-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 In-Reply-To: <540CB70E.30206@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:93139 Archived-At: 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.