Commit 1e49aa29 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(mouse-drag-region): Mouse in menu bar means scroll up.

parent ed814f55
......@@ -219,8 +219,16 @@ release the mouse button. Otherwise, it does not."
(mouse-scroll-subr (1+ (- mouse-row bottom))
mouse-drag-overlay start-point)))))
;; Otherwise, we have no idea where the mouse is.
(t)))))
(t
(let ((mouse-y (cdr (cdr (mouse-position))))
(menu-bar-lines (or (cdr (assq 'menu-bar-lines
(frame-parameters)))
0)))
;; Are we on the menu bar?
(and (integerp mouse-y) (< mouse-y menu-bar-lines)
(mouse-scroll-subr (- mouse-y menu-bar-lines)
mouse-drag-overlay start-point))))))))
(if (and (eq (get (event-basic-type event) 'event-kind) 'mouse-click)
(eq (posn-window (event-end event)) start-window)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment