Mercurial > emacs
changeset 78067:b24147eb76bb
(mouse-drag-mode-line-1): Quit mouse tracking when
event is not a cons cell. Do not unread drag-mouse-1 events.
Select right window in check whether space was stolen from
window above.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Mon, 02 Jul 2007 05:40:12 +0000 |
parents | 18c85566528f |
children | 5af810b51863 |
files | lisp/mouse.el |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mouse.el Sun Jul 01 03:23:11 2007 +0000 +++ b/lisp/mouse.el Mon Jul 02 05:40:12 2007 +0000 @@ -433,9 +433,8 @@ ;; - there is a scroll-bar-movement event ;; (same as mouse movement for our purposes) ;; quit if - ;; - there is a keyboard event or some other unknown event - ;; unknown event. - (cond ((integerp event) + ;; - there is a keyboard event or some other unknown event. + (cond ((not (consp event)) (setq done t)) ((memq (car event) '(switch-frame select-window)) @@ -443,7 +442,11 @@ ((not (memq (car event) '(mouse-movement scroll-bar-movement))) (when (consp event) - (push event unread-command-events)) + ;; Do not unread a drag-mouse-1 event since it will cause the + ;; selection of the window above when dragging the modeline + ;; above the selected window. + (unless (eq (car event) 'drag-mouse-1) + (push event unread-command-events))) (setq done t)) ((not (eq (car mouse) start-event-frame)) @@ -498,7 +501,10 @@ (and (not should-enlarge-minibuffer) (> growth 0) mode-line-p - (/= top (nth 1 (window-edges))))) + (/= top + (nth 1 (window-edges + ;; Choose right window. + start-event-window))))) (set-window-configuration wconfig))))))))) (defun mouse-drag-mode-line (start-event)