Subject: bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments

From: Robert Weiner <[email-masked]>
Date: Sat, 30 Sep 2017 08:45:53 -0400

On Sat, Sep 30, 2017 at 4:32 AM, martin rudalics <[email-masked]> wrot

>
> (frame-selected-window (posn-window position)) might not be the window
> under the mouse cursor.

​You are correct.  Though in testing 5 different mouse key bindings it was
correct 4 out of 5 times because the depress part of the cross-frame drag
event selected the window of the depress which is probably more accurate
than existing results.  I agree though that there may be uses of drag
events where one does not want to select the window of the depress.

This speaks to my point in my most recent prior message, "If we just had a
way to get a window from a set of coordinates within a frame, then I think
this would help solve a lot of this."  If the event-end of Emacs mouse drag
events included a window, rather than a frame, when the endpoint of the
drag is at a position unique to a window (considering Z-frame order), I
think that would solve all these issues and simplify parts of the posn code.

Bob