From 320bd90ebb2c6e068b5bf25c608bd0b26cd59256 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 15 May 2026 12:58:53 +0530 Subject: [PATCH] macOS: Pass drop intent to OS --- glfw/cocoa_window.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 29fae9e05..7e555fb36 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1630,7 +1630,13 @@ reset_drop_copy_mimes(_GLFWDropData *d) { size_t accepted_count = _glfwInputDropEvent(window, GLFW_DROP_MOVE, xpos, ypos, d->copy_mimes, d->copy_mimes_count, from_self); update_drop_state(window, accepted_count, GLFW_DROP_MOVE); } - return window->ns.drop_data.drag_accepted ? NSDragOperationGeneric : NSDragOperationNone; + switch (window->drop_operation.preferred) { + case GLFW_DRAG_OPERATION_NONE: return NSDragOperationNone; + case GLFW_DRAG_OPERATION_MOVE: return NSDragOperationMove; + case GLFW_DRAG_OPERATION_COPY: return NSDragOperationCopy; + case GLFW_DRAG_OPERATION_GENERIC: return NSDragOperationGeneric; + } + return NSDragOperationGeneric; } - (void)draggingExited:(id )sender