all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16681: mouse-autoselect-window missing when switching frames
@ 2014-02-07 14:18 Stefan Monnier
  2014-02-07 19:15 ` martin rudalics
  2017-02-18 11:37 ` martin rudalics
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-02-07 14:18 UTC (permalink / raw)
  To: 16681

Package: Emacs
Version: 24.3.50


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.




In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.22)
 of 2014-02-02 on pastel
Repository revision: monnier@iro.umontreal.ca-20140130214249-81biuubr7j6wwc30
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description:	Debian GNU/Linux testing (jessie)

Configured using:
 `configure -C --enable-checking --enable-check-lisp-object-type
 'CFLAGS=-Wall -g3 -O0 -Wno-pointer-sign''

Important settings:
  value of $LANG: fr_CH.UTF-8
  locale-coding-system: utf-8-unix

Major mode: InactiveMinibuffer

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  electric-pair-mode: t
  url-handler-mode: t
  global-reveal-mode: t
  reveal-mode: t
  auto-insert-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<up> <left> <right> <up> <left> <right> <down> <left> 
<right> <down> <left> <right> <down> <down-mouse-1> 
<mouse-movement> <mouse-1> <double-down-mouse-1> <mouse-movement> 
<mouse-movement> <double-drag-mouse-1> <down-mouse-1> 
<mouse-1> <double-down-mouse-1> <mouse-movement> <mouse-movement> 
<double-drag-mouse-1> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<down-mouse-1> <mouse-movement> <mouse-1> <double-down-mouse-1> 
<mouse-movement> <mouse-movement> <double-drag-mouse-1> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <down-mouse-1> <mouse-movement> 
<mouse-1> <double-down-mouse-1> <mouse-movement> <mouse-movement> 
<double-drag-mouse-1> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <select-window> <select-window> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <select-window> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <down-mouse-1> <mouse-movement> <mouse-1> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <down-mouse-1> <mouse-movement> 
<mouse-1> C-s C-w C-w C-w <switch-frame> C-s C-s C-a 
<down-mouse-1> <mouse-1> C-e <down-mouse-5> <mouse-5> 
<help-echo> <switch-frame> <switch-frame> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-1> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<help-echo> <select-window> <select-window> <select-window> 
<select-window> <select-window> <switch-frame> <switch-frame> 
<select-window> <select-window> <select-window> <select-window> 
<select-window> <select-window> <help-echo> <select-window> 
<help-echo> <select-window> <select-window> <select-window> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<help-echo> <switch-frame> <switch-frame> <help-echo> 
<switch-frame> <switch-frame> <switch-frame> <help-echo> 
<switch-frame> <help-echo> <switch-frame> <switch-frame> 
<help-echo> <select-window> <help-echo> <switch-frame> 
<switch-frame> <help-echo> <switch-frame> <switch-frame> 
<help-echo> <switch-frame> <switch-frame> <help-echo> 
<switch-frame> <switch-frame> <select-window> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <help-echo> <switch-frame> <help-echo> 
<switch-frame> <help-echo> <select-window> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <select-window> 
<help-echo> <select-window> <help-echo> <switch-frame> 
<switch-frame> <help-echo> <switch-frame> <switch-frame> 
<select-window> <help-echo> <select-window> <select-window> 
<help-echo> <select-window> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<help-echo> <select-window> <help-echo> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
C-h v m o u - a u t <tab> C-a C-k <switch-frame> <switch-frame> 
<switch-frame> <help-echo> <switch-frame> <switch-frame> 
<switch-frame> C-y C-a C-M-SPC <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> C-e <backspace> <backspace> <tab> <tab> 
<return> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> M-x r e p - e m - b u <tab> <return
>

Recent messages:
uncompressing autoload.el.gz...done
Note: file is write protected
Warning: turn-on-eldoc-mode is obsolete!
Mark saved where search started [2 times]
uncompressing package.el.gz...done
Note: file is write protected
Warning: turn-on-eldoc-mode is obsolete!
Mark saved where search started [2 times]
Making completion list...


Load-path shadows:
/home/monnier/src/emacs/elpa/packages/company/.dir-locals hides /home/monnier/src/emacs/elpa/packages/js2-mode/.dir-locals
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-mode hides /home/monnier/src/emacs/work/lisp/progmodes/ada-mode
/home/monnier/src/emacs/elpa/packages/company/.dir-locals hides /home/monnier/src/emacs/work/lisp/gnus/.dir-locals

Features:
(qp rect sort mail-extr emacsbug log-edit message sendmail rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mail-utils mailheader pcvs-util vc-sccs vc-svn vc-cvs vc-rcs
vc-dir smerge-mode bug-reference add-log whitespace diff-mode vc
vc-dispatcher xscheme unsafep trace testcover shadow scheme re-builder
profiler pcase inf-lisp ielm pp gmm-utils ert ewoc debug elp edebug
cl-indent eieio-opt speedbar sb-image ezimage dframe completion
autorevert filenotify bbdb-com mailabbrev bbdb timezone sgml-mode
reftex-dcr reftex reftex-vars tex-mode compile shell latexenc
org-protocol org-mouse org-mobile org-agenda org-indent org-feed
org-crypt org-capture org-attach vc-git org-id cus-edit cus-start
cus-load wid-edit org-element org-rmail org-mhe org-irc org-info
org-gnus org-docview doc-view jka-compr image-mode dired org-bibtex
bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func misearch multi-isearch executable copyright view
cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays
hol-loaddefs warnings cal-french vc-bzr filecache vlf diary-lib
diary-loaddefs mule-util cal-move cal-menu calendar cal-loaddefs server
noutline outline easy-mmode flyspell ispell eldoc checkdoc thingatpt
help-mode elec-pair url-handlers url-parse auth-source eieio eieio-core
gnus-util mm-util mail-prsvr password-cache url-vars reveal autoinsert
proof-site proof-autoloads cl-macs gv cl pg-vars time-date savehist
minibuf-eldef disp-table edmacro kmacro cl-loaddefs cl-lib info easymenu
byte-opt bytecomp byte-compile cconv advice help-fns package
bbdb-autoloads agda2 vm-autoloads tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16681: mouse-autoselect-window missing when switching frames
  2014-02-07 14:18 bug#16681: mouse-autoselect-window missing when switching frames Stefan Monnier
@ 2014-02-07 19:15 ` martin rudalics
  2014-02-08  7:42   ` Eli Zaretskii
  2017-02-18 11:37 ` martin rudalics
  1 sibling, 1 reply; 4+ messages in thread
From: martin rudalics @ 2014-02-07 19:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 16681

 > 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.

Works without problems on Window XP.  On my Debian GTK build I have to
set `focus-follows-mouse' to t to make it work.

martin





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16681: mouse-autoselect-window missing when switching frames
  2014-02-07 19:15 ` martin rudalics
@ 2014-02-08  7:42   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2014-02-08  7:42 UTC (permalink / raw)
  To: martin rudalics; +Cc: 16681

> Date: Fri, 07 Feb 2014 20:15:12 +0100
> From: martin rudalics <rudalics@gmx.at>
> Cc: 16681@debbugs.gnu.org
> 
>  > 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.
> 
> Works without problems on Window XP.  On my Debian GTK build I have to
> set `focus-follows-mouse' to t to make it work.

On Windows XP here, it doesn't work unless I set focus-follows-mouse
non-nil.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16681: mouse-autoselect-window missing when switching frames
  2014-02-07 14:18 bug#16681: mouse-autoselect-window missing when switching frames Stefan Monnier
  2014-02-07 19:15 ` martin rudalics
@ 2017-02-18 11:37 ` martin rudalics
  1 sibling, 0 replies; 4+ messages in thread
From: martin rudalics @ 2017-02-18 11:37 UTC (permalink / raw)
  To: Stefan Monnier, 16681

 > 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);
	else
	  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






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-18 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 14:18 bug#16681: mouse-autoselect-window missing when switching frames Stefan Monnier
2014-02-07 19:15 ` martin rudalics
2014-02-08  7:42   ` Eli Zaretskii
2017-02-18 11:37 ` martin rudalics

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.