From 06d201c3a5dfbdf88acbdc1b208f1b58b4a4c058 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Apr 2026 09:55:36 +0530 Subject: [PATCH] ... --- docs/dnd-protocol.rst | 5 +++-- kitty/glfw.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/dnd-protocol.rst b/docs/dnd-protocol.rst index 7fed4dda2..da30f725f 100644 --- a/docs/dnd-protocol.rst +++ b/docs/dnd-protocol.rst @@ -210,7 +210,8 @@ If the terminal program determines that it wants to start a drag at that location, it must send the terminal the ``t=o:o=flags`` escape code again, but with a payload consisting of the space separated MIME types it offers. The ``flags`` indicate what types of operations the client supports, ``1`` for -copy, ``2`` for move and ``3`` for either. Note that at this time the drag +copy, ``2`` for move and ``3`` for either. The transmission should be chunked +if the list of MIME types is too long. Note that at this time the drag operation has not actually started, this gives the terminal program the opportunity to pre-send some data or set one or more images to act as thumbnails for the drag operation. @@ -225,7 +226,7 @@ terminal program should pre-send the data for them unless it is very large. This is because some platforms, such as macOS, need pre sent data to be able to interoperate with native programs. The terminal emulator should reply with ``t=R ; EFBIG`` if too much data is sent and cancel the drag. Terminals must -accept at least 64MB of present data. +accept at least 64MB of pre sent data. Pre sent data is sent with escape codes of the form:: diff --git a/kitty/glfw.c b/kitty/glfw.c index 717f302f7..e20d4ccb6 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1058,7 +1058,8 @@ free_drag_source(void) { void cancel_current_drag_source(void) { - if (!ds.from_os_window) return; OSWindow *w = os_window_for_id(ds.from_os_window); if (!w || !w->handle) return; + if (!ds.from_os_window) return; + OSWindow *w = os_window_for_id(ds.from_os_window); if (!w || !w->handle) return; glfwStartDrag(w->handle, NULL, 0, NULL, -3, false); }