emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 26: Code that fixes mouse-drag-and-drop-region to work across


From: martin rudalics
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

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]