From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Emacs 26: Code that fixes mouse-drag-and-drop-region to work across frames Date: Thu, 2 Nov 2017 15:00:48 -0400 Message-ID: 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> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0945ae070819055d049dfe" X-Trace: blaine.gmane.org 1509649329 31727 195.159.176.226 (2 Nov 2017 19:02:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2017 19:02:09 +0000 (UTC) Cc: Alan Third , Tak Kunihiro , emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 02 20:02:01 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 1eAKkU-0007DS-Cs for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2017 20:01:54 +0100 Original-Received: from localhost ([::1]:33536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAKkb-0001OD-If for ged-emacs-devel@m.gmane.org; Thu, 02 Nov 2017 15:02:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAKjz-0001O6-Bl for emacs-devel@gnu.org; Thu, 02 Nov 2017 15:01:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAKjw-0006wT-A7 for emacs-devel@gnu.org; Thu, 02 Nov 2017 15:01:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAKjw-0006wC-6r for emacs-devel@gnu.org; Thu, 02 Nov 2017 15:01:20 -0400 Original-Received: from mail-qk0-f181.google.com ([209.85.220.181]:49993) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eAKjv-0002fU-SQ for emacs-devel@gnu.org; Thu, 02 Nov 2017 15:01:19 -0400 Original-Received: by mail-qk0-f181.google.com with SMTP id q83so612372qke.6 for ; Thu, 02 Nov 2017 12:01:19 -0700 (PDT) X-Gm-Message-State: AJaThX7NuU6wIT9/xN4WhCwhiDPkesV6kJwN8tQRhNeC2hP9k30BT2sa q824zHmLjzT93cx84YfOewc59dgs5EBDsAuEgRw= X-Google-Smtp-Source: ABhQp+RvejDB5kQTE2Z8Rfh5RCteu64QbPk4Adh17BkLMmplha0MNw5Yunk1amZ6W7FUFKjSjyGMyMfdXoDPqDnzXw4= X-Received: by 10.55.73.129 with SMTP id w123mr6473719qka.156.1509649279287; Thu, 02 Nov 2017 12:01:19 -0700 (PDT) Original-Received: by 10.200.12.74 with HTTP; Thu, 2 Nov 2017 12:00:48 -0700 (PDT) In-Reply-To: <59FAEA97.308@gmx.at> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:219870 Archived-At: --94eb2c0945ae070819055d049dfe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 2, 2017 at 5:51 AM, martin rudalics wrote: > > =E2=80=98frame-x-dot-y=E2=80=99 should be the Emacs frame under the mouse= which is not > necessarily the selected frame. Why do you want it to be the selected > =E2=80=8B=E2=80=8B > frame? Don't you want to drop your object on the frame under the mouse? =E2=80=8B=E2=80=8B =E2=80=8BI see your point and agree. =E2=80=8B=E2=80=8B =E2=80=8BBut this is not what mouse-position and =E2=80=8Bpixel-position re= turn by default (when mouse-position-function is nil) on MacOS. They always return the last registered frame which is the frame that was last clicked upon twice (as you have noted, a single click does not register with Emacs but only selects the frame). This seemed to be the case under Windows 7 for me as well, using Emacs -q under Emacs 25.3 and Emacs 26. Since I always reference the mouse position after a click or drag and can make the new frame be selected after a drag, I wrote the function this way to give me the most recently selected frame. 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. Bob --94eb2c0945ae070819055d049dfe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 2, 20= 17 at 5:51 AM, martin rudalics <rudalics@gmx.at> wrote:

=E2=80=98frame-x-dot-y=E2=80=99 should be the Emacs frame under the mouse w= hich is not
necessarily the selected frame.=C2=A0 Why do you want it to be the selected=
=E2=80=8B=E2=80=8B
frame?=C2=A0 Don't you want to drop = your object on the frame under the mouse?
=E2=80=8B=E2=80=8B
= =E2=80=8BI see your point and agree.
=E2=80=8B=E2=80=8B
=E2=80=8BBut this= is not what mouse-position and =E2=80=8Bpixel-position return by default (= when mouse-position-function is nil)
on MacOS.=C2=A0 They always ret= urn the last registered frame which is the frame that was last clicked upon= twice (as you
have noted, a single click does not register with Emacs but= only selects the frame).=C2=A0 This seemed to be the case under
Windows 7= for me as well, using Emacs -q under Emacs 25.3 and Emacs 26.

<= div class=3D"gmail_default" style=3D"font-family:monospace,monospace">Since= I always reference the mouse position after a click or drag and can make t= he new frame be selected after a drag,
I wrote the function this way to gi= ve me the most recently selected frame.

There needs to be a fix in t= he core of Emacs so these functions can return the frame under the mouse re= gardless of how
the window manager handles selecting frames, I think.
Bob

--94eb2c0945ae070819055d049dfe--