emacs-devel
[Top][All Lists]
Advanced

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

Re: mouse-autoselect-window


From: martin rudalics
Subject: Re: mouse-autoselect-window
Date: Tue, 18 Sep 2007 09:02:50 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

I disagree.  I'm running Emacs on GNU/Linux under KDE, I have a
click-to-focus policy but also have mouse-autoselect-window set to t,
because I want to have autoselection between split windows within a
single frame.  I also observe the same behavior that Drew Adams
described.

I'm afraid that autoselection between windows of the same frame only
is somewhat very difficult to achieve.  The attached patch should
correct the behavior observed by Drew though.  Could you please try?
*** window.el.~1.120.2.2.~      Wed Aug  8 23:12:06 2007
--- window.el   Tue Sep 18 08:54:28 2007
***************
*** 921,927 ****
        (setq mouse-autoselect-window-state nil)
        (when mouse-autoselect-window
          ;; Run `mouse-leave-buffer-hook' when autoselecting window.
!         (run-hooks 'mouse-leave-buffer-hook))
        (select-window window)))))
  
  (define-key ctl-x-map "2" 'split-window-vertically)
--- 921,932 ----
        (setq mouse-autoselect-window-state nil)
        (when mouse-autoselect-window
          ;; Run `mouse-leave-buffer-hook' when autoselecting window.
!         (run-hooks 'mouse-leave-buffer-hook)
!         (unless focus-follows-mouse
!           ;; Make sure frame is raised when autoselecting window and
!           ;; we assume that the window manager does not autoraise the
!           ;; frame of window.
!           (raise-frame (window-frame window))))
        (select-window window)))))
  
  (define-key ctl-x-map "2" 'split-window-vertically)

reply via email to

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