Mercurial > emacs
comparison lisp/x-dnd.el @ 90237:aa89c814f853
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-88
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 569-579)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 129-132)
- Update from CVS
- Merge from emacs--cvs-trunk--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 07 Oct 2005 07:15:40 +0000 |
parents | 2d92f5c9d6ae c502b2c18f47 |
children | c5406394f567 |
comparison
equal
deleted
inserted
replaced
90236:7871ecd1281b | 90237:aa89c814f853 |
---|---|
305 (handler (cdr type-info)) | 305 (handler (cdr type-info)) |
306 (state (x-dnd-get-state-for-frame frame)) | 306 (state (x-dnd-get-state-for-frame frame)) |
307 (action (aref state 5)) | 307 (action (aref state 5)) |
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 ;; If dropping in a window, open files in that window rather | 311 (not (window-minibuffer-p w)) |
312 ;; than in a new widow. | 312 (not (window-dedicated-p w))) |
313 (let ((dnd-open-file-other-window nil)) | 313 ;; If dropping in an ordinary window which we could use, |
314 ;; let dnd-open-file-other-window specify what to do. | |
315 (progn | |
314 (goto-char (posn-point (event-start event))) | 316 (goto-char (posn-point (event-start event))) |
315 (funcall handler window action data)) | 317 (funcall handler window action data)) |
316 (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)) | |
317 (select-frame frame) | 321 (select-frame frame) |
318 (funcall handler window action data)))))) | 322 (funcall handler window action data)))))) |
319 | 323 |
320 (defun x-dnd-handle-drag-n-drop-event (event) | 324 (defun x-dnd-handle-drag-n-drop-event (event) |
321 "Receive drag and drop events (X client messages). | 325 "Receive drag and drop events (X client messages). |