]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix NS drag and drop on macOS
authorPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 09:11:07 +0000 (17:11 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 09:11:07 +0000 (17:11 +0800)
* lisp/term/ns-win.el (gui-backend-set-selection):
* src/nsselect.m (Fns_begin_drag): Fix deprecation warnings and
selection/value mixup.

lisp/term/ns-win.el
src/nsselect.m

index 0b0775f10abd980fac54045f233b91a4b4c79cc2..42b8d72c269c41d1ff850278e99d8af176493ccc 100644 (file)
@@ -879,7 +879,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (cl-defmethod gui-backend-set-selection (selection value &context (window-system ns))
   (if (eq selection 'XdndSelection)
-      (setq ns-dnd-selection-value selection)
+      (setq ns-dnd-selection-value value)
     (if value (ns-own-selection-internal selection value)
       (ns-disown-selection-internal selection))))
 
index f7a8933c8512520a6ef4aa297cfddcd0c51a3cc9..a481e80d770d066d121a539ca3b85fcc69ed499e 100644 (file)
@@ -656,7 +656,7 @@ target, or the drop was rejected).  */)
   NSDragOperation operation;
 
   f = decode_window_system_frame (frame);
-  pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
+  pasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag];
   window = (EmacsWindow *) [FRAME_NS_VIEW (f) window];
 
   operation = ns_dnd_action_to_operation (action);