diff options
| author | Martin Rudalics | 2007-07-02 05:40:12 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-07-02 05:40:12 +0000 |
| commit | 20a65989fe617ef81420147ccdfb96c86b6e1b05 (patch) | |
| tree | 52410d1ae27cd5b42178e60ab8105ba992dc32c1 | |
| parent | 290c2be548f830c913cf8227a63b0d1b3dc547cc (diff) | |
| download | emacs-20a65989fe617ef81420147ccdfb96c86b6e1b05.tar.gz emacs-20a65989fe617ef81420147ccdfb96c86b6e1b05.zip | |
(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.
| -rw-r--r-- | lisp/mouse.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 94d19d99a21..27b32e9f6f6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -433,9 +433,8 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 433 | ;; - there is a scroll-bar-movement event | 433 | ;; - there is a scroll-bar-movement event |
| 434 | ;; (same as mouse movement for our purposes) | 434 | ;; (same as mouse movement for our purposes) |
| 435 | ;; quit if | 435 | ;; quit if |
| 436 | ;; - there is a keyboard event or some other unknown event | 436 | ;; - there is a keyboard event or some other unknown event. |
| 437 | ;; unknown event. | 437 | (cond ((not (consp event)) |
| 438 | (cond ((integerp event) | ||
| 439 | (setq done t)) | 438 | (setq done t)) |
| 440 | 439 | ||
| 441 | ((memq (car event) '(switch-frame select-window)) | 440 | ((memq (car event) '(switch-frame select-window)) |
| @@ -443,7 +442,11 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 443 | 442 | ||
| 444 | ((not (memq (car event) '(mouse-movement scroll-bar-movement))) | 443 | ((not (memq (car event) '(mouse-movement scroll-bar-movement))) |
| 445 | (when (consp event) | 444 | (when (consp event) |
| 446 | (push event unread-command-events)) | 445 | ;; Do not unread a drag-mouse-1 event since it will cause the |
| 446 | ;; selection of the window above when dragging the modeline | ||
| 447 | ;; above the selected window. | ||
| 448 | (unless (eq (car event) 'drag-mouse-1) | ||
| 449 | (push event unread-command-events))) | ||
| 447 | (setq done t)) | 450 | (setq done t)) |
| 448 | 451 | ||
| 449 | ((not (eq (car mouse) start-event-frame)) | 452 | ((not (eq (car mouse) start-event-frame)) |
| @@ -498,7 +501,10 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 498 | (and (not should-enlarge-minibuffer) | 501 | (and (not should-enlarge-minibuffer) |
| 499 | (> growth 0) | 502 | (> growth 0) |
| 500 | mode-line-p | 503 | mode-line-p |
| 501 | (/= top (nth 1 (window-edges))))) | 504 | (/= top |
| 505 | (nth 1 (window-edges | ||
| 506 | ;; Choose right window. | ||
| 507 | start-event-window))))) | ||
| 502 | (set-window-configuration wconfig))))))))) | 508 | (set-window-configuration wconfig))))))))) |
| 503 | 509 | ||
| 504 | (defun mouse-drag-mode-line (start-event) | 510 | (defun mouse-drag-mode-line (start-event) |