# HG changeset patch # User Richard M. Stallman # Date 745104591 0 # Node ID c071de5725653c7f7dc659495cfd3199fe770a1a # Parent fb0a5397e2233c98193563c3f586e66d05a3d611 (mouse-drag-region): Mouse in menu bar means scroll up. diff -r fb0a5397e223 -r c071de572565 lisp/mouse.el --- a/lisp/mouse.el Wed Aug 11 21:26:38 1993 +0000 +++ b/lisp/mouse.el Wed Aug 11 21:29:51 1993 +0000 @@ -219,8 +219,16 @@ (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)