mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00: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:
parent
2b4c51707f
commit
e99a6c686b
1 changed files with 2 additions and 1 deletions
|
|
@ -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();
|
||||
}];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue