More work on the DnD kitten

This commit is contained in:
Kovid Goyal
2026-05-13 07:17:06 +05:30
parent cb8fe24ab1
commit b28712bfae
6 changed files with 160 additions and 59 deletions

View File

@@ -4333,7 +4333,7 @@ add_uri_list_drag_items(_GLFWwindow *window, NSMutableArray<NSDraggingItem*>* dr
NSString *extension = [url pathExtension];
UTType *type = [UTType typeWithFilenameExtension:extension];
if (!type) type = UTTypeItem;
snprintf(buf, sizeof(buf), "text/uri-list:%d", count);
snprintf(buf, sizeof(buf), "kitty-internal/uri-list-item-%d", count);
GLFWFilePromiseProviderDelegate* delegate = [[[GLFWFilePromiseProviderDelegate alloc]
initWithWindow:window mimeType:buf instanceId:_glfw.drag.instance_id] autorelease];
NSFilePromiseProvider *provider = [[[NSFilePromiseProvider alloc]

1
glfw/glfw3.h vendored
View File

@@ -1828,6 +1828,7 @@ typedef struct GLFWDragSourceItem {
const char *optional_data;
size_t data_size;
bool is_remote_client;
int type; // used for file promises type of entry 0 = regular, 1 = symlink, 2 = directory
} GLFWDragSourceItem;
typedef struct GLFWDragEvent {