changeset 4577:c071de572565

(mouse-drag-region): Mouse in menu bar means scroll up.
author Richard M. Stallman <rms@gnu.org>
date Wed, 11 Aug 1993 21:29:51 +0000
parents fb0a5397e223
children 56078e258f15
files lisp/mouse.el
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)