From: Richard M. Stallman Date: Sun, 4 Mar 2007 17:46:23 +0000 (+0000) Subject: (mouse-drag-mode-line-1, mouse-drag-vertical-line): X-Git-Tag: emacs-pretest-22.0.96~290 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35da1e483043754beabd356746d68087473917fc;p=emacs.git (mouse-drag-mode-line-1, mouse-drag-vertical-line): Don't select the window -- pass it to primitives instead. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index ef0784d8973..94897f57e99 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -409,11 +409,6 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." should-enlarge-minibuffer event mouse y top bot edges wconfig growth) (track-mouse (progn - ;; enlarge-window only works on the selected window, so - ;; we must select the window where the start event originated. - ;; unwind-protect will restore the old selected window later. - (select-window start-event-window) - ;; if this is the bottommost ordinary window, then to ;; move its modeline the minibuffer must be enlarged. (setq should-enlarge-minibuffer @@ -421,7 +416,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." mode-line-p (not (one-window-p t)) (= (nth 1 (window-edges minibuffer)) - (nth 3 (window-edges))))) + (nth 3 (window-edges start-event-window))))) ;; loop reading events and sampling the position of ;; the mouse. @@ -459,7 +454,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." (t (setq y (cdr (cdr mouse)) - edges (window-edges) + edges (window-edges start-event-window) top (nth 1 edges) bot (nth 3 edges)) @@ -572,10 +567,6 @@ resized by dragging their header-line." (error "Attempt to drag leftmost scrollbar"))) (track-mouse (progn - ;; enlarge-window only works on the selected window, so - ;; we must select the window where the start event originated. - ;; unwind-protect will restore the old selected window later. - (select-window start-event-window) ;; loop reading events and sampling the position of ;; the mouse. (while (not done) @@ -611,9 +602,9 @@ resized by dragging their header-line." ;; If the scroll bar is on the window's left, ;; adjust the window on the left. (if (eq which-side 'right) - (selected-window) + start-event-window (mouse-drag-vertical-line-rightward-window - (selected-window))))) + start-event-window)))) (setq x (- (car (cdr mouse)) (if (eq which-side 'right) 0 2)) edges (window-edges window)