diff --git a/docs/changelog.rst b/docs/changelog.rst index 2fd7861f0..34528dd00 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -164,6 +164,8 @@ Detailed list of changes - Fix a regression in 0.43.0 that caused high CPU usage when :opt:`disable_ligatures` was set to ``cursor`` and the tab bar was visible (:iss:`9071`) +- macOS: Handle dropping of file promises into kitty in addition to file paths (:pull:`9084`) + 0.43.1 [2025-10-01] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index b1c4c6818..b4c952f13 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -789,7 +789,18 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; self.identifier = @"kitty-content-view"; [self updateTrackingAreas]; - [self registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString]]; + // Register for file promises in addition to regular files (macOS 10.12+) + if (@available(macOS 10.12, *)) { + NSMutableArray *types = [NSMutableArray arrayWithObjects: + NSPasteboardTypeFileURL, + NSPasteboardTypeString, + nil]; + // Add file promise types + [types addObjectsFromArray:[NSFilePromiseReceiver readableDraggedTypes]]; + [self registerForDraggedTypes:types]; + } else { + [self registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString]]; + } } return self;