From e99a6c686bc6710b574bc5d90d22cbe9b929c4b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 8 May 2026 15:29:11 +0000 Subject: [PATCH] Add DRAG_FINISH_TIMEOUT_SECONDS named constant for the 2-second timeout Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/5f783d91-e095-4f98-9d13-9d6359889ea2 Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> --- glfw/cocoa_window.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 09b1b6f42..146d407d5 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -4148,6 +4148,7 @@ static void schedule_drag_finish_timer(void); static GLFWid drag_finish_window_id = 0; static GLFWDragOperationType drag_finish_action = 0; static NSTimer *drag_finish_timer = nil; +#define DRAG_FINISH_TIMEOUT_SECONDS 2.0 @implementation GLFWDraggingSource - (NSDragOperation)draggingSession:(NSDraggingSession*)session @@ -4250,7 +4251,7 @@ schedule_drag_finish_timer(void) { [drag_finish_timer invalidate]; drag_finish_timer = nil; } - drag_finish_timer = [NSTimer scheduledTimerWithTimeInterval:2.0 repeats:NO block:^(NSTimer *t UNUSED) { + drag_finish_timer = [NSTimer scheduledTimerWithTimeInterval:DRAG_FINISH_TIMEOUT_SECONDS repeats:NO block:^(NSTimer *t UNUSED) { drag_finish_timer = nil; fire_drag_finished(); }];