From: Po Lu Date: Fri, 27 May 2022 09:11:07 +0000 (+0800) Subject: Fix NS drag and drop on macOS X-Git-Tag: emacs-29.0.90~1910^2~396 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d2523dcd035b2ac058abc9962405422e9717ea1;p=emacs.git 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. --- 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);