]> code.delx.au - gnu-emacs/blobdiff - lisp/x-dnd.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / x-dnd.el
index a215faab85e506d72398eaa118d337eabb7a9b01..f6f3b75dc0795f0fd44123f0808d3b3b58234456 100644 (file)
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -121,14 +121,15 @@ any protocol specific data.")
 
 (defun x-dnd-init-frame (&optional frame)
   "Setup drag and drop for FRAME (i.e. create appropriate properties)."
-  (x-register-dnd-atom "DndProtocol" frame)
-  (x-register-dnd-atom "_MOTIF_DRAG_AND_DROP_MESSAGE" frame)
-  (x-register-dnd-atom "XdndEnter" frame)
-  (x-register-dnd-atom "XdndPosition" frame)
-  (x-register-dnd-atom "XdndLeave" frame)
-  (x-register-dnd-atom "XdndDrop" frame)
-  (x-dnd-init-xdnd-for-frame frame)
-  (x-dnd-init-motif-for-frame frame))
+  (when (eq 'x (window-system frame))
+    (x-register-dnd-atom "DndProtocol" frame)
+    (x-register-dnd-atom "_MOTIF_DRAG_AND_DROP_MESSAGE" frame)
+    (x-register-dnd-atom "XdndEnter" frame)
+    (x-register-dnd-atom "XdndPosition" frame)
+    (x-register-dnd-atom "XdndLeave" frame)
+    (x-register-dnd-atom "XdndDrop" frame)
+    (x-dnd-init-xdnd-for-frame frame)
+    (x-dnd-init-motif-for-frame frame)))
 
 (defun x-dnd-get-state-cons-for-frame (frame-or-window)
   "Return the entry in x-dnd-current-state for a frame or window."