aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mouse.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 41b543e3892..07b525546cf 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -759,12 +759,14 @@ If DIR is positive skip forward; if negative, skip backward."
759 (throw 'mouse-show-mark t))))) 759 (throw 'mouse-show-mark t)))))
760 (move-overlay mouse-drag-overlay (point) (mark t)) 760 (move-overlay mouse-drag-overlay (point) (mark t))
761 (catch 'mouse-show-mark 761 (catch 'mouse-show-mark
762 ;; In this loop, read and execute scroll bar events. 762 ;; In this loop, execute scroll bar and switch-frame events.
763 ;; Otherwise, if we 763 ;; Also ignore down-events that are undefined.
764 (while (progn (setq event (read-event)) 764 (while (progn (setq event (read-event))
765 (setq events (append events (list event))) 765 (setq events (append events (list event)))
766 (setq key (apply 'vector events)) 766 (setq key (apply 'vector events))
767 (or (and (consp event) 767 (or (and (consp event)
768 (eq (car event) 'switch-frame))
769 (and (consp event)
768 (eq (posn-point (event-end event)) 770 (eq (posn-point (event-end event))
769 'vertical-scroll-bar)) 771 'vertical-scroll-bar))
770 (and (memq 'down (event-modifiers event)) 772 (and (memq 'down (event-modifiers event))
@@ -772,8 +774,9 @@ If DIR is positive skip forward; if negative, skip backward."
772 (not (mouse-undouble-last-event events)) 774 (not (mouse-undouble-last-event events))
773 (not (member key mouse-region-delete-keys))))) 775 (not (member key mouse-region-delete-keys)))))
774 (and (consp event) 776 (and (consp event)
775 (eq (posn-point (event-end event)) 777 (or (eq (car event) 'switch-frame)
776 'vertical-scroll-bar) 778 (eq (posn-point (event-end event))
779 'vertical-scroll-bar))
777 (let ((keys (vector 'vertical-scroll-bar event))) 780 (let ((keys (vector 'vertical-scroll-bar event)))
778 (and (key-binding keys) 781 (and (key-binding keys)
779 (progn 782 (progn