mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(x-dnd-drop-data): Check for dedicated windows.
This commit is contained in:
parent
6487ea0d84
commit
69a069faab
1 changed files with 7 additions and 4 deletions
|
|
@ -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))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue