]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-drag-region): Mouse in menu bar means scroll up.
authorRichard M. Stallman <rms@gnu.org>
Wed, 11 Aug 1993 21:29:51 +0000 (21:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 11 Aug 1993 21:29:51 +0000 (21:29 +0000)
lisp/mouse.el

index 49e78c4f1b6df99cef1ca672904b5c3e44843686..d59bc57e74d24f6cf69135030a2cfb2d19f58ce9 100644 (file)
@@ -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)