diff options
| author | Richard M. Stallman | 2005-10-04 20:29:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-04 20:29:50 +0000 |
| commit | 69a069faab95e903b33b25397fa72def3146ec36 (patch) | |
| tree | 4ae982bbe23a6db3b2576cc309be948c621dddfb | |
| parent | 6487ea0d84ebc2fd72f6e43cd029ccf25a269d8c (diff) | |
| download | emacs-69a069faab95e903b33b25397fa72def3146ec36.tar.gz emacs-69a069faab95e903b33b25397fa72def3146ec36.zip | |
(x-dnd-drop-data): Check for dedicated windows.
| -rw-r--r-- | lisp/x-dnd.el | 11 |
1 files changed, 7 insertions, 4 deletions
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." | |||
| 308 | (w (posn-window (event-start event)))) | 308 | (w (posn-window (event-start event)))) |
| 309 | (when handler | 309 | (when handler |
| 310 | (if (and (windowp w) (window-live-p w) | 310 | (if (and (windowp w) (window-live-p w) |
| 311 | (not (minibufferp (window-buffer w)))) | 311 | (not (window-minibuffer-p w)) |
| 312 | ;; If dropping in a window, open files in that window rather | 312 | (not (window-dedicated-p w))) |
| 313 | ;; than in a new widow. | 313 | ;; If dropping in an ordinary window which we could use, |
| 314 | ;; let dnd-open-file-other-window specify what to do. | ||
| 314 | (progn | 315 | (progn |
| 315 | (goto-char (posn-point (event-start event))) | 316 | (goto-char (posn-point (event-start event))) |
| 316 | (funcall handler window action data)) | 317 | (funcall handler window action data)) |
| 317 | (let ((dnd-open-file-other-window t)) ;; Dropping on non-window. | 318 | ;; If we can't display the file here, |
| 319 | ;; make a new window for it. | ||
| 320 | (let ((dnd-open-file-other-window t)) | ||
| 318 | (select-frame frame) | 321 | (select-frame frame) |
| 319 | (funcall handler window action data)))))) | 322 | (funcall handler window action data)))))) |
| 320 | 323 | ||