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: Wed, 1 Nov 2017 16:41:43 -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> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113e20520ebbe6055cf1e85c" X-Trace: blaine.gmane.org 1509568986 18004 195.159.176.226 (1 Nov 2017 20:43:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Nov 2017 20:43:06 +0000 (UTC) Cc: Tak Kunihiro , emacs-devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 01 21:43:02 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 1e9zqf-0003cw-AA for ged-emacs-devel@m.gmane.org; Wed, 01 Nov 2017 21:42:53 +0100 Original-Received: from localhost ([::1]:57635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9zqk-0005tM-Vm for ged-emacs-devel@m.gmane.org; Wed, 01 Nov 2017 16:42:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9zq7-0005rK-LG for emacs-devel@gnu.org; Wed, 01 Nov 2017 16:42:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9zq2-0005qk-L5 for emacs-devel@gnu.org; Wed, 01 Nov 2017 16:42:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9zq2-0005qX-IN for emacs-devel@gnu.org; Wed, 01 Nov 2017 16:42:14 -0400 Original-Received: from mail-qt0-f176.google.com ([209.85.216.176]:55714) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1e9zq2-0004GZ-AP for emacs-devel@gnu.org; Wed, 01 Nov 2017 16:42:14 -0400 Original-Received: by mail-qt0-f176.google.com with SMTP id v41so4278032qtv.12 for ; Wed, 01 Nov 2017 13:42:14 -0700 (PDT) X-Gm-Message-State: AMCzsaUsXp0cxtKL9KsMrib01Z92o3zJr8JmkZTkclUeoQBVKeHJcHME fW9uo8Uj8tJzvsj2YY52Bn9TZRgmNz1l3zIytxw= X-Google-Smtp-Source: ABhQp+QnHwYv/lWBhwbyxET1wKYWYQHg69eoUPv6Fs6CDL26k8ytRfWQylRbWQ/oTq2BVK9I1LPj6pJqeWnFhFmx2aU= X-Received: by 10.200.56.52 with SMTP id q49mr1833657qtb.309.1509568933705; Wed, 01 Nov 2017 13:42:13 -0700 (PDT) Original-Received: by 10.200.12.74 with HTTP; Wed, 1 Nov 2017 13:41:43 -0700 (PDT) In-Reply-To: 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:219858 Archived-At: --001a113e20520ebbe6055cf1e85c Content-Type: text/plain; charset="UTF-8" I have been using this snippet without a problem for a while. Is it sufficient to resolve the issues we are discussing with mouse-position and mouse-pixel-position? (setq mouse-position-function (lambda (frame-x-dot-y) "Under macOS and Windows 7, mouse-position and mouse-pixel-position sometimes return the prior frame; change to always return the selected frame." (if (consp frame-x-dot-y) (setcar frame-x-dot-y (selected-frame))) frame-x-dot-y)) Bob --001a113e20520ebbe6055cf1e85c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have been using this snippet without a problem for a while.= =C2=A0 Is it sufficient
to resolve the issues we are discussing with mouse= -position and mouse-pixel-position?

=C2=A0 =C2=A0 (setq mouse-position-fun= ction
<= /span>=C2=A0 (lambda (frame-x-dot-y)
=C2=A0 =C2=A0 "Under macOS and Wi= ndows 7, mouse-position and mouse-pixel-position sometimes return the prior= frame; change to always return the selected frame."
=C2=A0 =C2=A0 (= if (consp frame-x-dot-y) (setcar frame-x-dot-y (selected-frame)))
=C2=A0 = =C2=A0 frame-x-dot-y))

Bob

= --001a113e20520ebbe6055cf1e85c--