From 3896846b63993f31e32eb9034ea9674631b9cdd4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 5 May 2026 12:42:09 +0530 Subject: [PATCH] Fix self drops on macOS --- glfw/cocoa_window.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 28ea585e5..d1f317618 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -4191,7 +4191,10 @@ void _glfwCocoaPostEmptyEvent(void) { NSEvent *currentEvent = [NSApp currentEvent]; if (currentEvent && currentEvent.type == NSEventTypeKeyDown && currentEvent.keyCode == 53) { ev.type = GLFW_DRAG_CANCELLED; - } else ev.type = GLFW_DRAG_DROPPED; + } else { + ev.type = GLFW_DRAG_DROPPED; + ev.drop_maybe_a_cancel = true; + } } break; default: ev.type = GLFW_DRAG_DROPPED; break;