bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28620: Interact directly on Emacs bug#28620: mouse drag event record


From: Robert Weiner
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

On Sat, Oct 14, 2017 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 frame or not (when the frame is covered by an external app's window).

​I 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)​.  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]