summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-10-25 14:59:39 +0300
committerEli Zaretskii <eliz@gnu.org>2022-10-25 14:59:39 +0300
commit92ec31a48c7fa2a700eb3a5c618fe015843e6875 (patch)
treed206f9cad15ef94b1d26ffa1a091c294f8142f1b /lisp
parent095dadf27781b5f7916db0b5d669d7ced8f76d7e (diff)
parentb6097fe279b03e2fb50fc6af063d7c8f1e55fe8b (diff)
downloademacs-92ec31a48c7fa2a700eb3a5c618fe015843e6875.tar.gz
emacs-92ec31a48c7fa2a700eb3a5c618fe015843e6875.tar.bz2
emacs-92ec31a48c7fa2a700eb3a5c618fe015843e6875.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp')
-rw-r--r--lisp/x-dnd.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index ee80e41a22e..058ab99f5cb 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -675,7 +675,15 @@ with coordinates relative to the root window."
(defun x-dnd-get-drop-rectangle (window posn)
"Return the drag-and-drop rectangle at POSN on WINDOW."
(if (or dnd-scroll-margin
- (not (windowp window)))
+ (not (windowp window))
+ ;; Drops on the scroll bar aren't allowed, but the mouse
+ ;; rectangle can be set while still on the scroll bar,
+ ;; causing the drag initiator to never send an XdndPosition
+ ;; event that will an XdndStatus message with the accept
+ ;; flag set to be set, even after the mouse enters the
+ ;; window text area. To prevent that, simply don't generate
+ ;; a mouse rectangle when an area is set.
+ (posn-area posn))
'(0 0 0 0)
(let ((window-rectangle (x-dnd-get-window-rectangle window))
object-rectangle)