From: Richard M. Stallman Date: Wed, 11 Aug 1993 21:29:51 +0000 (+0000) Subject: (mouse-drag-region): Mouse in menu bar means scroll up. X-Git-Tag: emacs-19.34~11274 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e49aa290a0393a8fec86fe7e74440b723d81324;p=emacs.git (mouse-drag-region): Mouse in menu bar means scroll up. --- 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)