[Top][All Lists]

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

bug#16681: mouse-autoselect-window missing when switching frames

From: martin rudalics
Subject: bug#16681: mouse-autoselect-window missing when switching frames
Date: Sat, 18 Feb 2017 12:37:24 +0100

> In a system with "focus follows mouse" do the following:
>     % src/emacs -Q --eval '(setq mouse-autoselect-window t)'
>     C-x 5 2
>     <place the two frames side by side>
>     C-x 2
>     <go to the second frame>
>     C-x 2
> Now move mouse "in circle":
> - top-left window, then top-right window, then bottom-right window, then
>    bottom-left window, and if you like it, you can keep doing it for a while.
> notice how this *should* select each one of the four windows in each cycle,
> but instead only 2 of those windows are selected: when crossing from one
> frame to the other the new frame is selected, but that frame's selected
> window is used as the new selected window instead of using that the
> window into which the mouse just entered.

Is this still an issue (with ‘focus-follows-mouse’ non-nil, obviously)?

If so, could you please check with GDB whether setting a break point in
the MotionNotify case in xterm.c triggers when the mouse crosses from
one frame into another?  To make such a test practical, please replace
the first line

        x_display_set_last_user_time (dpyinfo, event->xmotion.time);

there by some dummy construct like

        if (any == XFRAME (selected_frame))
          x_display_set_last_user_time (dpyinfo, event->xmotion.time);
          x_display_set_last_user_time (dpyinfo, event->xmotion.time);

and put the breakpoint at the last line of that construct.

If it doesn't trigger, we'll probably have to put a similar detection
routine into EnterNotify although such an approach might clash with the
window manager's focus-in handling.

Thanks, martin

reply via email to

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