From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Possible Bug: Mouse drag event records wrong window for release when crossing frames Date: Fri, 29 Sep 2017 10:34:21 +0200 Message-ID: <59CE058D.3010607@gmx.at> References: <59CB5D45.9070603@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506674141 7482 195.159.176.226 (29 Sep 2017 08:35:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2017 08:35:41 +0000 (UTC) Cc: emacs-devel To: rswgnu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 29 10:35:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxqll-0001bE-Rq for ged-emacs-devel@m.gmane.org; Fri, 29 Sep 2017 10:35:37 +0200 Original-Received: from localhost ([::1]:34168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxqlt-0008I8-B1 for ged-emacs-devel@m.gmane.org; Fri, 29 Sep 2017 04:35:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxqkf-00088s-0t for emacs-devel@gnu.org; Fri, 29 Sep 2017 04:34:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxqkb-0002jd-UQ for emacs-devel@gnu.org; Fri, 29 Sep 2017 04:34:29 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:58231) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxqkb-0002ir-LI for emacs-devel@gnu.org; Fri, 29 Sep 2017 04:34:25 -0400 Original-Received: from [192.168.1.100] ([46.125.249.81]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M5csW-1d9U7b2yfA-00xacP; Fri, 29 Sep 2017 10:34:23 +0200 In-Reply-To: X-Provags-ID: V03:K0:TEO4GD99sTAo/qOBsbbHzMzvPkz/3CQmlNB1R57cyoFWGTKkEIG WmcvMod8zZ7CKRINvY+OpJFEGIAQGtAMr5Qn0v84dDBspNp0iSjFjBCgLrOTKT9opslhURE XQrYBQ3vnXwhFSlQH1glw7dIEvyMPxowmu7CV2dgR6WKSCtA+qsHBg7aKB/MGPnfsLBcI/6 74OvvcOY6HIkLbKj1MgBw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Q6fHI5wA8aM=:+okDyDxzkfobcdJw2KQdmY F1qdnjYq2k8i2DFBgjoAwlHmgD1uuZO9xZnNMjUHc8f/BVMOsNsgf+w2yoYxrtnmQzGPajf7h 1eK00Hf3zEjXIZ2K/RYql1eKEsihlUzSJGKJyDTkWx0PWY1J/1KTGM9EDAe8nbmd4Ss8hPxD4 +KuOYeGeewPOc0O66NzKz16V6pHy/l3BI780DoObNYxKk4IifWk8QVUF49aWDczUzFz5cxJxG 6mLW/MoD289CIPNWe8AnsGLAfm9kdSU6I2K6HdZzyf0Xrwst3iekSXMKv/Ku8nO+UxZy1mXM3 QepYpGI7N2vA59erBDrQ+vmUjijICWlA5lzQ016CsEoFI90dm5ds7dMhYBil14fcCpL+DjJz9 IV2YxSnPHXtwo1OQq920psvHmrlJ8swF7lOJp5ndxiXLPDbUre0aBOibqI2uBiE16oMwkbogb eoLWdDPMgGU5kzaT8hUfh7KNOWEB4C7lmFW2gxCB5K0gtqTPaO7C2u6Rvs0bf8R6RtVvT4aUp qkqQX23CBo9vPiRY5pAPNjXUHMGz48NAHcqux519O4ps+7mUfcgnlsU0e83HuQ+CdNdsuYb3B ahmizMw2mI+aAI5xwuZ1zsFBXR2IassdYhFJundSPiD/R7PbJHCJH9rHXqDwem4MWs8p15Q3S 9EIDrcfJ16jZBAKfZKAz6XtfV1hqSLGuQi2Et6x41yyDqGgCOesWaxB807t/xvlLvrbJlPjjG W1/qqkQuygs3FosNDYk6vRtlrRRk0xl5XQw+8+DO3w75x2vtbDBYrP+pji3zTTdZPq5q6D8u X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218882 Archived-At: > =E2=80=8BThe behavior is the same either way. It is definitely a bug = in Emacs 25.2 > and 25.3 as I have confirmed it on both MacOS and Windows 7 using just= > default mouse-1 =E2=80=8Bdrags between frames. Do you mean that earlier Emacsen behave differently in this regard? >>> (drag-mouse-2 (# 2905 (88 . 467) 4050744= 642 >> nil >>> 2905 (12 . 33) nil (4 . 5) (7 . 14)) (#>> "/Users/bk/Dropbox/emacs/hyperbole/" 0x102f5bde8> nil (-1373 . 463) >>> 4050749802)) >> >> The start event seems to look OK. As for the end event, an X-coordin= ate >> of -1373 does not look reasonable. > > > =E2=80=8BRight. Is a negative value ever valid in this context? I think so. For example if you want to move your frame to that position on the screen. > My claim is that if you put 2 frames on screen (start with non-overlap= ping) > and drag mouse-1 from the text area of one to the second, that the dra= g > event generated upon the release of mouse-1 will contain frame1 rather= than > frame2 (where the release happened).=E2=80=8B IIUC Emacs never was able to do that. Mouse dragging events so far make sense only for the one-frame case. What you want involves much more trickery: If you have two target frames covering the same screen position, which one would you choose when releasing the mouse at that position? Probably the one higher in the z-order. But only Emacs 26 can handle that and we would have to write routines to do it. Or the one that gets focus during mouse tracking because your window manager has some sort of focus-follows-mouse installed? Then you would have to query the focus when you release the mouse. Non-trivial. martin