Subject: Re: bug#4892: compute_motion, mouse_position

From: Alan Third <[email-masked]>
Date: Mon, 02 Dec 2019 13:42:55 +0000

David Reitter <[email-masked]> writes:

> 1. (mouse-position) does not return the selected frame when several
> frames overlap (partially).  To reproduce, I arrange the frames on the
> screen, then select the lower one by clicking with the mouse, then the
> one that's supposed to go on top.  With the mouse cursor still over
> the intersecting section (on top of the upper frame), I do M-: (mouse- 
> position).  This will then return the wrong frame.  Reproducible with
> Emacs -Q (NS port with NS frames)

It looks to me like it returns the last frame that an Emacs mouse event
was generated on. That's not necessarily the last frame clicked as the
standard behaviour on macOS is to NOT generate application events when
an OS window is selected.

It's unclear to me exactly what ns_mouse_position should be doing here.
I've had a look at the documentation and other terminal's
implementations and I'm none the wiser as there seem to be many
exceptions.

-- 
Alan Third