From bf677042d49c531278ce7b8b413ff4722efd5577 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Apr 2026 09:07:01 +0530 Subject: [PATCH] Cleanup previous PR --- kitty/dnd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kitty/dnd.c b/kitty/dnd.c index 3bcfe495a..77e1e4c78 100644 --- a/kitty/dnd.c +++ b/kitty/dnd.c @@ -20,7 +20,6 @@ static const size_t MIME_LIST_SIZE_CAP = 1024 * 1024; static const size_t PRESENT_DATA_CAP = 64 * 1024 * 1024; -#define DROP_REQUEST_QUEUE_CAP 128 // In test mode, this callable is invoked instead of schedule_write_to_child_if_possible. // It receives (window_id: int, data: bytes) and its return value is ignored. @@ -1005,7 +1004,7 @@ drop_enqueue_request(Window *w, uint32_t request_id, char type, const char *payl return; } - if (w->drop.num_data_requests >= DROP_REQUEST_QUEUE_CAP) { + if (w->drop.num_data_requests >= arraysz(w->drop.data_requests)) { /* Queue full: deny with EMFILE and end the drop */ uint32_t saved = w->drop.current_request_id; w->drop.current_request_id = request_id;