From 03714c7f0986a62aeaa1390d3125c064fbcef45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 3 Oct 2005 19:41:49 +0000 Subject: * x-dnd.el (x-dnd-drop-data): Don't set dnd-open-file-other-window to nil if dropping on a window. Handle dropping on a minibuffer window like dropping on a non-window part of Emacs. --- lisp/x-dnd.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/x-dnd.el') diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 612e033c4cb..4b23665bca2 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -307,10 +307,11 @@ nil if not." (action (aref state 5)) (w (posn-window (event-start event)))) (when handler - (if (and (windowp w) (window-live-p w)) + (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. - (let ((dnd-open-file-other-window nil)) + (progn (goto-char (posn-point (event-start event))) (funcall handler window action data)) (let ((dnd-open-file-other-window t)) ;; Dropping on non-window. -- cgit v1.2.1 From 69a069faab95e903b33b25397fa72def3146ec36 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Oct 2005 20:29:50 +0000 Subject: (x-dnd-drop-data): Check for dedicated windows. --- lisp/x-dnd.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/x-dnd.el') diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 4b23665bca2..88a39ea679e 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -308,13 +308,16 @@ nil if not." (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)))))) -- cgit v1.2.1