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>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-08 15:29:11 +00:00 committed by GitHub
parent 2b4c51707f
commit e99a6c686b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
}];