|Subject:||bug#28620: Interact directly on Emacs bug#28620: mouse drag event records wrong release window|
|Date:||Wed, 11 Oct 2017 14:49:45 -0400|
Martin wrote:Take the position of the event-end (if it's a frame) and translate it
into absolute screen coordinates (the Elisp manual should give you
enough clues to do that). Or, try ‘mouse-absolute-pixel-position
’ - it
should give you the screen position of the mouse at that time so you can
ignore the event completely.
Then walk all your windows and compare that position with whatever
‘window-absolute-pixel-edges’ returns for that window. If you have two
or more positives, run ‘frame-list-z-order’ and compare the result
against those windows' frames. No hands, IMHO.
I wrote:frame-list-z-order is Emacs 26 only; I need something that works with older versions.I'll see if I can make this work under Emacs 26 and then we can contemplate a solution that would apply to earlier versions.Thanks for the reminder. It does still seem to me that there should be a function that takes a mouse position and returnsthe top-most Emacs window that the position is in or nil. I'll work on it.
|[Prev in Thread]||Current Thread||[Next in Thread]|