]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-drag-region): Handle scroll off top/bottom.
authorKarl Heuer <kwzh@gnu.org>
Sat, 16 Apr 1994 06:47:20 +0000 (06:47 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 16 Apr 1994 06:47:20 +0000 (06:47 +0000)
lisp/mouse.el

index 37dec0fa498a9a2ae77afc924d4d1c2bbde107f8..f60955a4907f697acf4c83e2dd8ea78afd0af608 100644 (file)
@@ -236,31 +236,17 @@ release the mouse button.  Otherwise, it does not."
              (let ((range (mouse-start-end start-point (point) click-count)))
                (move-overlay mouse-drag-overlay (car range) (nth 1 range))))
 
-            ;; Are we moving on a different window on the same frame?
-            ((and (windowp (posn-window end))
-                  (eq (window-frame (posn-window end)) start-frame))
-             (let ((mouse-row
-                    (+ (nth 1 (window-edges (posn-window end)))
-                       (cdr (posn-col-row end)))))
+            (t
+             (let ((mouse-row (cdr (cdr (mouse-position)))))
                (cond
+                ((null mouse-row))
                 ((< mouse-row top)
                  (mouse-scroll-subr
                   (- mouse-row top) mouse-drag-overlay start-point))
                 ((and (not (eobp))
                       (>= mouse-row bottom))
                  (mouse-scroll-subr (1+ (- mouse-row bottom))
-                                    mouse-drag-overlay start-point)))))
-
-            (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))))))))
+                                    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)