Track remote client on drag source items

This commit is contained in:
Kovid Goyal 2026-05-08 16:54:20 +05:30
parent b85ec2b8c6
commit 9e8bd7207b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 3 additions and 0 deletions

1
glfw/glfw3.h vendored
View file

@ -1827,6 +1827,7 @@ typedef struct GLFWDragSourceItem {
// Can be on null to provide data when the drag is started should be used only when the data is relatively small // Can be on null to provide data when the drag is started should be used only when the data is relatively small
const char *optional_data; const char *optional_data;
size_t data_size; size_t data_size;
bool is_remote_client;
} GLFWDragSourceItem; } GLFWDragSourceItem;
typedef struct GLFWDragEvent { typedef struct GLFWDragEvent {

1
kitty/glfw-wrapper.h generated
View file

@ -1555,6 +1555,7 @@ typedef struct GLFWDragSourceItem {
// Can be on null to provide data when the drag is started should be used only when the data is relatively small // Can be on null to provide data when the drag is started should be used only when the data is relatively small
const char *optional_data; const char *optional_data;
size_t data_size; size_t data_size;
bool is_remote_client;
} GLFWDragSourceItem; } GLFWDragSourceItem;
typedef struct GLFWDragEvent { typedef struct GLFWDragEvent {

View file

@ -3079,6 +3079,7 @@ start_window_drag(Window *w, bool in_test_mode) {
items[i].mime_type = w->drag_source.items[i].mime_type; items[i].mime_type = w->drag_source.items[i].mime_type;
items[i].optional_data = (char*)w->drag_source.items[i].optional_data; items[i].optional_data = (char*)w->drag_source.items[i].optional_data;
items[i].data_size = w->drag_source.items[i].data_size; items[i].data_size = w->drag_source.items[i].data_size;
items[i].is_remote_client = w->drag_source.is_remote_client;
} }
size_t num_images = 0; size_t num_images = 0;
for (size_t i = 0; i < arraysz(w->drag_source.images); i++) if (w->drag_source.images[i].data) num_images++; for (size_t i = 0; i < arraysz(w->drag_source.images); i++) if (w->drag_source.images[i].data) num_images++;