diff options
| author | Richard M. Stallman | 2007-03-04 17:46:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-03-04 17:46:23 +0000 |
| commit | 35da1e483043754beabd356746d68087473917fc (patch) | |
| tree | 9ccb45865d559ad73541e99c4e8a241e5c3864c3 | |
| parent | c57a1dc63b7cc32f055e2b0463adf86b6a1b405b (diff) | |
| download | emacs-35da1e483043754beabd356746d68087473917fc.tar.gz emacs-35da1e483043754beabd356746d68087473917fc.zip | |
(mouse-drag-mode-line-1, mouse-drag-vertical-line):
Don't select the window -- pass it to primitives instead.
| -rw-r--r-- | lisp/mouse.el | 17 |
1 files changed, 4 insertions, 13 deletions
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." | |||
| 409 | should-enlarge-minibuffer event mouse y top bot edges wconfig growth) | 409 | should-enlarge-minibuffer event mouse y top bot edges wconfig growth) |
| 410 | (track-mouse | 410 | (track-mouse |
| 411 | (progn | 411 | (progn |
| 412 | ;; enlarge-window only works on the selected window, so | ||
| 413 | ;; we must select the window where the start event originated. | ||
| 414 | ;; unwind-protect will restore the old selected window later. | ||
| 415 | (select-window start-event-window) | ||
| 416 | |||
| 417 | ;; if this is the bottommost ordinary window, then to | 412 | ;; if this is the bottommost ordinary window, then to |
| 418 | ;; move its modeline the minibuffer must be enlarged. | 413 | ;; move its modeline the minibuffer must be enlarged. |
| 419 | (setq should-enlarge-minibuffer | 414 | (setq should-enlarge-minibuffer |
| @@ -421,7 +416,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 421 | mode-line-p | 416 | mode-line-p |
| 422 | (not (one-window-p t)) | 417 | (not (one-window-p t)) |
| 423 | (= (nth 1 (window-edges minibuffer)) | 418 | (= (nth 1 (window-edges minibuffer)) |
| 424 | (nth 3 (window-edges))))) | 419 | (nth 3 (window-edges start-event-window))))) |
| 425 | 420 | ||
| 426 | ;; loop reading events and sampling the position of | 421 | ;; loop reading events and sampling the position of |
| 427 | ;; the mouse. | 422 | ;; the mouse. |
| @@ -459,7 +454,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 459 | 454 | ||
| 460 | (t | 455 | (t |
| 461 | (setq y (cdr (cdr mouse)) | 456 | (setq y (cdr (cdr mouse)) |
| 462 | edges (window-edges) | 457 | edges (window-edges start-event-window) |
| 463 | top (nth 1 edges) | 458 | top (nth 1 edges) |
| 464 | bot (nth 3 edges)) | 459 | bot (nth 3 edges)) |
| 465 | 460 | ||
| @@ -572,10 +567,6 @@ resized by dragging their header-line." | |||
| 572 | (error "Attempt to drag leftmost scrollbar"))) | 567 | (error "Attempt to drag leftmost scrollbar"))) |
| 573 | (track-mouse | 568 | (track-mouse |
| 574 | (progn | 569 | (progn |
| 575 | ;; enlarge-window only works on the selected window, so | ||
| 576 | ;; we must select the window where the start event originated. | ||
| 577 | ;; unwind-protect will restore the old selected window later. | ||
| 578 | (select-window start-event-window) | ||
| 579 | ;; loop reading events and sampling the position of | 570 | ;; loop reading events and sampling the position of |
| 580 | ;; the mouse. | 571 | ;; the mouse. |
| 581 | (while (not done) | 572 | (while (not done) |
| @@ -611,9 +602,9 @@ resized by dragging their header-line." | |||
| 611 | ;; If the scroll bar is on the window's left, | 602 | ;; If the scroll bar is on the window's left, |
| 612 | ;; adjust the window on the left. | 603 | ;; adjust the window on the left. |
| 613 | (if (eq which-side 'right) | 604 | (if (eq which-side 'right) |
| 614 | (selected-window) | 605 | start-event-window |
| 615 | (mouse-drag-vertical-line-rightward-window | 606 | (mouse-drag-vertical-line-rightward-window |
| 616 | (selected-window))))) | 607 | start-event-window)))) |
| 617 | (setq x (- (car (cdr mouse)) | 608 | (setq x (- (car (cdr mouse)) |
| 618 | (if (eq which-side 'right) 0 2)) | 609 | (if (eq which-side 'right) 0 2)) |
| 619 | edges (window-edges window) | 610 | edges (window-edges window) |