diff options
Diffstat (limited to 'lisp/x-dnd.el')
| -rw-r--r-- | lisp/x-dnd.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 04ef4f0b6dc..717fcf207da 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el | |||
| @@ -122,6 +122,12 @@ any protocol specific data.") | |||
| 122 | (defun x-dnd-init-frame (&optional frame) | 122 | (defun x-dnd-init-frame (&optional frame) |
| 123 | "Setup drag and drop for FRAME (i.e. create appropriate properties)." | 123 | "Setup drag and drop for FRAME (i.e. create appropriate properties)." |
| 124 | (when (eq 'x (window-system frame)) | 124 | (when (eq 'x (window-system frame)) |
| 125 | (x-register-dnd-atom "DndProtocol" frame) | ||
| 126 | (x-register-dnd-atom "_MOTIF_DRAG_AND_DROP_MESSAGE" frame) | ||
| 127 | (x-register-dnd-atom "XdndEnter" frame) | ||
| 128 | (x-register-dnd-atom "XdndPosition" frame) | ||
| 129 | (x-register-dnd-atom "XdndLeave" frame) | ||
| 130 | (x-register-dnd-atom "XdndDrop" frame) | ||
| 125 | (x-dnd-init-xdnd-for-frame frame) | 131 | (x-dnd-init-xdnd-for-frame frame) |
| 126 | (x-dnd-init-motif-for-frame frame))) | 132 | (x-dnd-init-motif-for-frame frame))) |
| 127 | 133 | ||
| @@ -320,7 +326,8 @@ nil if not." | |||
| 320 | ;; If dropping in an ordinary window which we could use, | 326 | ;; If dropping in an ordinary window which we could use, |
| 321 | ;; let dnd-open-file-other-window specify what to do. | 327 | ;; let dnd-open-file-other-window specify what to do. |
| 322 | (progn | 328 | (progn |
| 323 | (goto-char (posn-point (event-start event))) | 329 | (when (not mouse-yank-at-point) |
| 330 | (goto-char (posn-point (event-start event)))) | ||
| 324 | (funcall handler window action data)) | 331 | (funcall handler window action data)) |
| 325 | ;; If we can't display the file here, | 332 | ;; If we can't display the file here, |
| 326 | ;; make a new window for it. | 333 | ;; make a new window for it. |