diff lisp/x-dnd.el @ 65836:c502b2c18f47

(x-dnd-drop-data): Check for dedicated windows.
author Richard M. Stallman <rms@gnu.org>
date Tue, 04 Oct 2005 20:29:50 +0000
parents 637dfc9b8d2e
children 3bd95f4f2941 2a679c81f552 aa89c814f853
line wrap: on
line diff
--- a/lisp/x-dnd.el	Tue Oct 04 20:29:00 2005 +0000
+++ b/lisp/x-dnd.el	Tue Oct 04 20:29:50 2005 +0000
@@ -308,13 +308,16 @@
 	 (w (posn-window (event-start event))))
     (when handler
       (if (and (windowp w) (window-live-p w)
-	       (not (minibufferp (window-buffer w))))
-	  ;; If dropping in a window, open files in that window rather
-	  ;; than in a new widow.
+	       (not (window-minibuffer-p w))
+	       (not (window-dedicated-p w)))
+	  ;; If dropping in an ordinary window which we could use,
+	  ;; let dnd-open-file-other-window specify what to do.
 	  (progn
 	    (goto-char (posn-point (event-start event)))
 	    (funcall handler window action data))
-	(let ((dnd-open-file-other-window t))  ;; Dropping on non-window.
+	;; If we can't display the file here,
+	;; make a new window for it.
+	(let ((dnd-open-file-other-window t))
 	  (select-frame frame)
 	  (funcall handler window action data))))))