From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.bugs Subject: bug#28620: Interact directly on Emacs bug#28620: mouse drag event records wrong release window Date: Sat, 14 Oct 2017 23:31:31 -0400 Message-ID: References: <83wp4e3nvx.fsf@gnu.org> <8360bx340d.fsf@gnu.org> <8360bw19es.fsf@gnu.org> <83vajwytja.fsf@gnu.org> <83poa4yqyq.fsf@gnu.org> <83376qouoj.fsf@gnu.org> <59DF2260.5030204@gmx.at> <59E1CC55.2090400@gmx.at> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0626227c3719055b8d88ca" X-Trace: blaine.gmane.org 1508038980 3880 195.159.176.226 (15 Oct 2017 03:43:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Oct 2017 03:43:00 +0000 (UTC) Cc: Alan Third , 28620@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 15 05:42:56 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1e3Zp3-0007Gv-Ew for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Oct 2017 05:42:41 +0200 Original-Received: from localhost ([::1]:56036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3ZpA-0001M5-Pp for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Oct 2017 23:42:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3Zfn-0002Bz-D3 for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 23:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3Zfi-0003I0-GI for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 23:33:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3Zfi-0003Hv-Db for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 23:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e3Zfi-0002Vv-55 for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2017 23:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Oct 2017 03:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28620 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28620-submit@debbugs.gnu.org id=B28620.15080383349607 (code B ref 28620); Sun, 15 Oct 2017 03:33:02 +0000 Original-Received: (at 28620) by debbugs.gnu.org; 15 Oct 2017 03:32:14 +0000 Original-Received: from localhost ([127.0.0.1]:40831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3Zew-0002Ut-GK for submit@debbugs.gnu.org; Sat, 14 Oct 2017 23:32:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3Zev-0002Uf-4H for 28620@debbugs.gnu.org; Sat, 14 Oct 2017 23:32:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3Zek-0002jz-SS for 28620@debbugs.gnu.org; Sat, 14 Oct 2017 23:32:07 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3Zek-0002jk-Pc for 28620@debbugs.gnu.org; Sat, 14 Oct 2017 23:32:02 -0400 Original-Received: from mail-qk0-f170.google.com ([209.85.220.170]:44185) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1e3Zek-0002ym-Cj for 28620@debbugs.gnu.org; Sat, 14 Oct 2017 23:32:02 -0400 Original-Received: by mail-qk0-f170.google.com with SMTP id r64so9215122qkc.1 for <28620@debbugs.gnu.org>; Sat, 14 Oct 2017 20:32:02 -0700 (PDT) X-Gm-Message-State: AMCzsaXHm2PyTpKw48rOQkWKgbU+wA2SHUGAN3ozcGKwioGyOTnvhpcv nlVR8nkzyEDXRV5Chi2E1amebvT8i3HrFRhWJqY= X-Google-Smtp-Source: ABhQp+Q6l32MDdFLmSfK59VsADSR7VqDFt9csogjA8XeYRioYcjuHBzDLwpG1BgRLzPIQ+tJZamxWAIY3EdOGu1QalA= X-Received: by 10.55.124.198 with SMTP id x189mr8664833qkc.40.1508038321909; Sat, 14 Oct 2017 20:32:01 -0700 (PDT) Original-Received: by 10.237.34.225 with HTTP; Sat, 14 Oct 2017 20:31:31 -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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:138437 Archived-At: --94eb2c0626227c3719055b8d88ca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Oct 14, 2017 at 2:47 PM, Robert Weiner wrote: > On Sat, Oct 14, 2017 at 1:16 PM, Robert Weiner wrote: > >> it still leaves the issue of recognizing whether a drag release event >> maps to an Emacs frame or not (when the frame is covered by an external >> app's window). >> > =E2=80=8BI have written a Python script that can be used to get this answer= . (It uses the Python-to-Objective-C bridge library that exposes the relevant Mac APIs to Python)=E2=80=8B. The script takes two arguments, X and Y screen = pixel coordinates, gets a list of all visible application windows in Z-order and then prints the application name of the first window that intersects the (X,Y) position, if any. If that window is an Emacs frame, we have a match and otherwise, we don't. This is a short script that really needs to be recoded into an Objective-C function that can be exposed to Emacs Lisp. If anyone who is familiar with macOS Objective-C code would want to work with me on this, email me and I'll provide the Python code. It is only about 28 lines. -- Bob --94eb2c0626227c3719055b8d88ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Oct 14, 2= 017 at 2:47 PM, Robert Weiner <rsw= @gnu.org> wrote:=
On Sat, Oct 14, 2017 at 1:16 PM, Robert Weiner <rsw@gnu.org> wrote:
it still leaves= the issue of recognizing whether a drag release event maps to an Emacs fra= me or not (when the frame is covered by an external app's window).

=E2=80= =8BI have written a Python script that can be used to get this answer.=C2= =A0 (It uses the Python-to-Objective-C bridge library that exposes the rele= vant Mac APIs to Python)=E2=80=8B.=C2=A0 The script=C2=A0 takes two argumen= ts, X and Y screen pixel coordinates, gets a list of all visible applicatio= n windows in Z-order and then prints the application name of the first wind= ow that intersects the (X,Y) position, if any.=C2=A0 If that window is an E= macs frame, we have a match and otherwise, we don't.

This is a s= hort script that really needs to be recoded into an Objective-C function th= at can be exposed to Emacs Lisp.=C2=A0 If anyone who is familiar with macOS= Objective-C code would want to work with me on this, email me and I'll= provide the Python code.=C2=A0 It is only about 28 lines.=C2=A0 -- Bob


--94eb2c0626227c3719055b8d88ca--