mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 09:15:57 +02:00
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:
committed by
GitHub
parent
2b4c51707f
commit
e99a6c686b
@@ -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();
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user