From 5d2523dcd035b2ac058abc9962405422e9717ea1 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 27 May 2022 17:11:07 +0800 Subject: [PATCH] Fix NS drag and drop on macOS * 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 | 2 +- src/nsselect.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 0b0775f10ab..42b8d72c269 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -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)))) diff --git a/src/nsselect.m b/src/nsselect.m index f7a8933c851..a481e80d770 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -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); -- 2.39.2