]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix mishandling of dnd-scroll-margin with scroll bar motion
authorPo Lu <luangruo@yahoo.com>
Tue, 14 Jun 2022 09:43:08 +0000 (17:43 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 14 Jun 2022 09:43:36 +0000 (17:43 +0800)
* lisp/dnd.el (dnd-handle-movement): Ignore posns inside scroll
bars for now.

lisp/dnd.el

index 7eb43f5baab19f8e7b9de0c0dba5e10370dd400a..9d72a4b595898b0809fc7f294d9872ed35547e87 100644 (file)
@@ -112,7 +112,9 @@ program."
   "Handle mouse movement to POSN when receiving a drop from another program."
   (when (windowp (posn-window posn))
     (with-selected-window (posn-window posn)
-      (when dnd-scroll-margin
+      (when (and dnd-scroll-margin
+                 ;; TODO: handle scroll bars reasonably.
+                 (not (posn-area posn)))
         (ignore-errors
           (let* ((row (cdr (posn-col-row posn)))
                  (window (when (windowp (posn-window posn))