From 1e49aa290a0393a8fec86fe7e74440b723d81324 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 11 Aug 1993 21:29:51 +0000 Subject: [PATCH] (mouse-drag-region): Mouse in menu bar means scroll up. --- lisp/mouse.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 49e78c4f1b6..d59bc57e74d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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) -- 2.39.5