summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index ec1a4005a..3480bd0ab 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1284,7 +1284,6 @@ static void (*open_cb)(const char *) = 0;
(*open_cb)(filename);
}
}
-
// Unlock access to FLTK for all threads...
fl_unlock_function();
}
@@ -1538,9 +1537,9 @@ void fl_open_display() {
[NSApp setDelegate:mydelegate];
[NSApp finishLaunching];
- // empty the event queue
+ // empty the event queue but keep system events for drag&drop of files at launch
NSEvent *ign_event;
- do ign_event = [NSApp nextEventMatchingMask:NSAnyEventMask
+ do ign_event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSSystemDefinedMask)
untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
inMode:NSDefaultRunLoopMode
dequeue:YES];