308 |
(w (posn-window (event-start event)))) |
(w (posn-window (event-start event)))) |
309 |
(when handler |
(when handler |
310 |
(if (and (windowp w) (window-live-p w) |
(if (and (windowp w) (window-live-p w) |
311 |
(not (minibufferp (window-buffer w)))) |
(not (window-minibuffer-p w)) |
312 |
;; If dropping in a window, open files in that window rather |
(not (window-dedicated-p w))) |
313 |
;; than in a new widow. |
;; If dropping in an ordinary window which we could use, |
314 |
|
;; let dnd-open-file-other-window specify what to do. |
315 |
(progn |
(progn |
316 |
(goto-char (posn-point (event-start event))) |
(goto-char (posn-point (event-start event))) |
317 |
(funcall handler window action data)) |
(funcall handler window action data)) |
318 |
(let ((dnd-open-file-other-window t)) ;; Dropping on non-window. |
;; If we can't display the file here, |
319 |
|
;; make a new window for it. |
320 |
|
(let ((dnd-open-file-other-window t)) |
321 |
(select-frame frame) |
(select-frame frame) |
322 |
(funcall handler window action data)))))) |
(funcall handler window action data)))))) |
323 |
|
|