Fl_cocoa.mm: fixed bug where events of drag&drop of files at launch time were ignored

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2010-03-30 18:14:57 +00:00
parent 065dfed2c3
commit b2a7c3df5e

View File

@ -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];