GNU bug report logs - #28621
Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments

Previous Next

Package: emacs;

Reported by: rswgnu <at> gmail.com

Date: Wed, 27 Sep 2017 16:03:02 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: rswgnu <at> gmail.com
Cc: Eli Zaretskii <eliz <at> gnu.org>, 28621 <at> debbugs.gnu.org
Subject: bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments
Date: Sat, 30 Sep 2017 19:12:35 +0200
> 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.

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.

martin





This bug report was last modified 4 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.