unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: rswgnu@gmail.com
Cc: Alan Third <alan@idiocy.org>,
	Tak Kunihiro <homeros.misasa@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: Emacs 26: Code that fixes mouse-drag-and-drop-region to work across frames
Date: Thu, 02 Nov 2017 21:16:47 +0100	[thread overview]
Message-ID: <59FB7D2F.2080403@gmx.at> (raw)
In-Reply-To: <CA+OMD9g+_K6TSJ5Up2Dmhon8+zOBy7UP1wHKz7scwRaiKExgRg@mail.gmail.com>

 > This seemed to be the case under
 > Windows 7 for me as well, using Emacs -q under Emacs 25.3 and Emacs 26.
[...]
 > There needs to be a fix in the core of Emacs so these functions can return
 > the frame under the mouse regardless of how
 > the window manager handles selecting frames, I think.

As fas as Windows 7 is concerned, have a look at w32term.c.  In the
function w32_mouse_position you will see a call to GetCursorPos which
should retrieve the position of the mouse cursor into pt.  Then you will
see the check for x_mouse_grabbed.  If this check succeeds, then the
frame where the mouse was initially grabbed is taken.  Otherwise,
calling WindowFromPoint will try to get the window wfp at pt.  If the
call succeeds, the call of x_any_window_to_frame tries to establish the
Emacs frame f1 from wfp.

Step with GDB through these lines and you will see where it fails to
retrieve the frame under the mouse cursor.  If the problem is with the
x_mouse_grabbed check then the explanation is obvious: Mouse drags by
design only work within one and the same frame.  Otherwise we have to
dig further.

martin

BTW: Have a look at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19988
where this issue has been discussed already in some depth.



      reply	other threads:[~2017-11-02 20:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 16:27 Emacs 26: Code that fixes mouse-drag-and-drop-region to work across frames Robert Weiner
2017-10-12 16:42 ` Robert Weiner
2017-10-12 17:11   ` Robert Weiner
2017-10-13  9:57 ` Tak Kunihiro
2017-10-16 13:45   ` Robert Weiner
2017-10-16 14:13     ` Robert Weiner
2017-10-19  0:43       ` Tak Kunihiro
2017-10-26 22:07         ` Robert Weiner
2017-11-01  2:04           ` Tak Kunihiro
2017-11-01 15:24             ` Robert Weiner
2017-11-01 17:16               ` Alan Third
2017-11-01 20:18                 ` Robert Weiner
2017-11-01 20:41                   ` Robert Weiner
2017-11-02  9:51                     ` martin rudalics
2017-11-02 19:00                       ` Robert Weiner
2017-11-02 20:16                         ` martin rudalics [this message]

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=59FB7D2F.2080403@gmx.at \
    --to=rudalics@gmx.at \
    --cc=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=homeros.misasa@gmail.com \
    --cc=rswgnu@gmail.com \
    /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).