unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Weiner <rswgnu@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 28621@debbugs.gnu.org, Robert Weiner <rsw@gnu.org>
Subject: bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments
Date: Thu, 27 Jun 2019 08:27:49 -0400	[thread overview]
Message-ID: <F1C38609-E0DC-4821-92E6-5D882674A1C8@gmail.com> (raw)
In-Reply-To: <BE396DD9-75DF-40EE-B8D3-DA581A28422D@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]


> On Jun 26, 2019, at 10:20 PM, Robert Weiner <rswgnu@gmail.com> wrote:
> 
> I think all my changes are in the first message here.  Lars, can you see about integrating from there?  Thanks.
> 

Plus, this message now that I have re-read the thread.  I think the main issue was just documenting the changes in NEWS, Changes, the manuals, etc.  I have been using these patches for all this time now with Hyperbole’s cross-frame drags on multiple platforms under Emacs 26 without incident.  It would be great to see this moved forward.  — Bob

Robert Weiner <rsw@gnu.org> writes:

I wrote:
> 
> ​The issue, to recap, is that I can't find a function that
> will report the window that a mouse release button event
> occurs in if the depress and release are in different frames
> (for Emacs 25).
> 
> In fact, the release event (drag event) contains the wrong
> frame (that of the depress rather than the release).  The wrong 
> frame is also reported by mouse-position and mouse-pixel-position,
> so window-at can't be used either.

Show Quoted Content
> 
> ​The issue, to recap, is that I can't find a function that
> will report the window that a mouse release button event
> occurs in if the depress and release are in different frames
> (for Emacs 25).
> 
> In fact, the release event (drag event) contains the wrong
> frame (that of the depress rather than the release).  The wrong 
> frame is also reported by mouse-position and mouse-pixel-position,
> so window-at can't be used either.

The following is a temporary fix for the mouse-position and
mouse-pixel-position part of the problem.  Something needs to be fixed
in the original functions in the C code, though.  -- Bob

;; From mouse-position:
;;    f = SELECTED_FRAME ();
;;    XSETFRAME (lispy_dummy, f);
;;  It seems like the XSETFRAME macro is not properly copying the value of f on initial frame selection under the macOS window system.
;;  The problem occurs on other systems as well, e.g. Emacs 25.2 under Windows 7.
;;  The function below is a temporary fix for this.
(setq mouse-position-function
     (lambda (frame-x-dot-y)
   "Under macOS, mouse-position and mouse-pixel-position sometimes fail to return the selected-frame (returning the prior frame instead); fix that here."
   (setcar frame-x-dot-y (selected-frame))
   frame-x-dot-y))

[-- Attachment #2: Type: text/html, Size: 7167 bytes --]

  parent reply	other threads:[~2019-06-27 12:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 16:01 bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments Robert Weiner
2017-09-27 21:34 ` John Wiegley
2017-09-29  8:34 ` martin rudalics
2017-09-29 16:48   ` Robert Weiner
2017-09-29 19:42   ` Eli Zaretskii
2017-09-29 19:41 ` Eli Zaretskii
2017-09-29 20:11   ` Robert Weiner
2017-09-30  8:32     ` martin rudalics
2017-09-30 12:45       ` Robert Weiner
2017-09-30 12:52         ` Robert Weiner
2017-09-30 17:12         ` martin rudalics
2017-09-30 21:56           ` bug#28620: " Robert Weiner
2017-09-30 23:34             ` Robert Weiner
2017-10-16 15:11             ` bug#28620: Emacs bug#28620: (PARTIAL SOLUTION) mouse-position wrong on macOS and Windows 7 after mouse-1 click Bob Weiner
2019-06-24 16:08     ` bug#28621: Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments Lars Ingebrigtsen
2019-06-27  2:20       ` Robert Weiner
2019-06-27 10:39         ` Lars Ingebrigtsen
2019-06-27 12:27         ` Robert Weiner [this message]
2020-08-24 13:28           ` Lars Ingebrigtsen
2020-08-24 13:29           ` Lars Ingebrigtsen
2020-10-11  2:06             ` Lars Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
2017-09-27 15:44 bug#28620: Mouse drag event records wrong window for release when crossing frames Robert Weiner
2017-10-03 20:54 ` bug#28620: (mouse-position_ wrong on macOS after mouse-1 click (Was: Interact directly on Emacs bug#28620: mouse drag event records wrong release window) Robert Weiner
2017-10-16 15:57 ` bug#28620: (PARTIAL SOLUTION) Mouse drag event records wrong window for release when crossing frames Bob Weiner
2019-07-27  9:26 ` bug#36269: bug#28620: " martin rudalics
2019-07-27 10:08   ` Eli Zaretskii
2019-07-28  7:34     ` martin rudalics
2019-07-29 23:21       ` Robert Weiner
2019-07-30  7:00         ` bug#36269: " martin rudalics
2019-08-03 11:25       ` Eli Zaretskii
2019-08-04  7:59         ` martin rudalics
2020-08-18 11:31           ` bug#28620: bug#36269: " Stefan Kangas
2020-08-18 12:15             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F1C38609-E0DC-4821-92E6-5D882674A1C8@gmail.com \
    --to=rswgnu@gmail.com \
    --cc=28621@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=rsw@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).