diff options
| author | Po Lu | 2022-05-27 17:11:07 +0800 |
|---|---|---|
| committer | Po Lu | 2022-05-27 17:11:07 +0800 |
| commit | 5d2523dcd035b2ac058abc9962405422e9717ea1 (patch) | |
| tree | d8d3c2293a5c592c8f426132feea82c224eb47e9 | |
| parent | 01e3345b7bac8f8e79433360e3f2a6fa089c8ff7 (diff) | |
| download | emacs-5d2523dcd035b2ac058abc9962405422e9717ea1.tar.gz emacs-5d2523dcd035b2ac058abc9962405422e9717ea1.zip | |
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.
| -rw-r--r-- | lisp/term/ns-win.el | 2 | ||||
| -rw-r--r-- | 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.") | |||
| 879 | 879 | ||
| 880 | (cl-defmethod gui-backend-set-selection (selection value &context (window-system ns)) | 880 | (cl-defmethod gui-backend-set-selection (selection value &context (window-system ns)) |
| 881 | (if (eq selection 'XdndSelection) | 881 | (if (eq selection 'XdndSelection) |
| 882 | (setq ns-dnd-selection-value selection) | 882 | (setq ns-dnd-selection-value value) |
| 883 | (if value (ns-own-selection-internal selection value) | 883 | (if value (ns-own-selection-internal selection value) |
| 884 | (ns-disown-selection-internal selection)))) | 884 | (ns-disown-selection-internal selection)))) |
| 885 | 885 | ||
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). */) | |||
| 656 | NSDragOperation operation; | 656 | NSDragOperation operation; |
| 657 | 657 | ||
| 658 | f = decode_window_system_frame (frame); | 658 | f = decode_window_system_frame (frame); |
| 659 | pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard]; | 659 | pasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag]; |
| 660 | window = (EmacsWindow *) [FRAME_NS_VIEW (f) window]; | 660 | window = (EmacsWindow *) [FRAME_NS_VIEW (f) window]; |
| 661 | 661 | ||
| 662 | operation = ns_dnd_action_to_operation (action); | 662 | operation = ns_dnd_action_to_operation (action); |