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: Emacs 26: Code that fixes mouse-drag-and-drop-region to work across frames Date: Thu, 02 Nov 2017 21:16:47 +0100 Message-ID: <59FB7D2F.2080403@gmx.at> References: <86d15rjrpe.fsf@misasa.okayama-u.ac.jp> <86tvywotlz.fsf@misasa.okayama-u.ac.jp> <861sli69gj.fsf@misasa.okayama-u.ac.jp> <20171101171658.GB78963@breton.holly.idiocy.org> <59FAEA97.308@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1509653849 8644 195.159.176.226 (2 Nov 2017 20:17:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2017 20:17:29 +0000 (UTC) Cc: Alan Third , Tak Kunihiro , emacs-devel To: rswgnu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 02 21:17:21 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 1eALvU-0001VG-1f for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2017 21:17:20 +0100 Original-Received: from localhost ([::1]:33763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eALvZ-0001dI-Sl for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2017 16:17:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eALvT-0001d1-H0 for emacs-devel@gnu.org; Thu, 02 Nov 2017 16:17:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eALvQ-0003sw-AY for emacs-devel@gnu.org; Thu, 02 Nov 2017 16:17:19 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:50772) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eALvQ-0003rR-0z for emacs-devel@gnu.org; Thu, 02 Nov 2017 16:17:16 -0400 Original-Received: from [192.168.1.100] ([46.125.249.17]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MGBdv-1dxNDJ1L3n-00F9Qj; Thu, 02 Nov 2017 21:16:58 +0100 In-Reply-To: X-Provags-ID: V03:K0:T7C9pLIQCEq9TVqNi3pxYaLgbI86h7D6UO1A/Vg2MFP/vZbkZWs KAx9VgEZpXhK7mT7TVNYfIOmgegF/SHFLDoPZ+2TZwP18PKBa9We8DJAiBYSRkkALRHOsSm tnkyp4bxn3hvOPl4NHuh0c4H3CxKXJRCD3CTiev30neSPZLKzC5DnAz5S8Ba1xLtUVU/oc6 97LxNB1AZApUz7YYc7dFA== X-UI-Out-Filterresults: notjunk:1;V01:K0:9tVWvyq/15g=:8YYE42K2ls6N/0TWhe4E+S Zszu/Y2XdWIK7JtVu4/MGJpSSFmdqm2K7cxSh8Fmjdd/Jp040UW8XRIK7zGsDo6NShQ1k2yQ8 uecH0cyf1n35mI+joxWAJVZ1uQZMRzGncJuzACH9qrMxRMP4cl3L1TGWpTPGb8a9UA5JVvA05 eIeHcfSnZZvTo3G/iekxXPjwGj7Oe7KufhHeXXaI/YG7V+cxnNh0I2kvRgP4Zs0k2SxCn/6Re abB//VRsMvd2hiZVxaItI5hG+VSCfEMGGjgAEqVRU63jZp/pJbEqDBuqRJKzSPOGM/CoI7HUR T0BxrdXzeL2+OlJUKjabZbf933C1DAwQkaIyIrhKFMHVD91B3gna6Mk9SfCabUlzI7jTwKKmI ZT2QidfLWIIyEjQ01aD57SaQfP/5sXq1z0iHvO7TDaMcC3slcGbk1BSGGPzDLe24YIr3zZcqn pImmzipjU/Y8LTDEda6n6k/4hi4Ara/k1QbcQjNqHxBSmeCMEdabYWIcosu4zthFDK+/5t/zt suxR3wsQqiU0TH43OnTN80UAu4ode2HQ5fMM9W82zzUAoC686zM7MC+8pcqxv1aqPg5EYWSS7 /otBPHhM9Q42lMIVEss4dNom+DP/7OBkRxCxFZrV5o9lfWlE9OQ/K/ztjwpUi5fnJi6gOYbAj 0QVs09rgvXOx19uIIJ4mx5PX13IXfeOHRqpW1FDReN5vQqX66asSbC28bT/aME/yVFkCDcEhS 8XDSXW82NEYEa/sEfGw+yUpvEfse/cMllWd7E9P/s3WzegB+ckDKcePTj5N1Q3A5T0PG7arK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 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:219872 Archived-At: > This seemed to be the case under > Windows 7 for me as well, using Emacs -q under Emacs 25.3 and Emacs 26. [...] > There needs to be a fix in the core of Emacs so these functions can return > the frame under the mouse regardless of how > the window manager handles selecting frames, I think. As fas as Windows 7 is concerned, have a look at w32term.c. In the function w32_mouse_position you will see a call to GetCursorPos which should retrieve the position of the mouse cursor into pt. Then you will see the check for x_mouse_grabbed. If this check succeeds, then the frame where the mouse was initially grabbed is taken. Otherwise, calling WindowFromPoint will try to get the window wfp at pt. If the call succeeds, the call of x_any_window_to_frame tries to establish the Emacs frame f1 from wfp. Step with GDB through these lines and you will see where it fails to retrieve the frame under the mouse cursor. If the problem is with the x_mouse_grabbed check then the explanation is obvious: Mouse drags by design only work within one and the same frame. Otherwise we have to dig further. martin BTW: Have a look at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19988 where this issue has been discussed already in some depth.