Skip to content

Commit

Permalink
Fl_cocoa.mm: fixed bug where events of drag&drop of files at launch t…
Browse files Browse the repository at this point in the history
…ime were ignored

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Mar 30, 2010
1 parent 065dfed commit b2a7c3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Fl_cocoa.mm
Expand Up @@ -1284,7 +1284,6 @@ - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppl
(*open_cb)(filename);
}
}

// Unlock access to FLTK for all threads...
fl_unlock_function();
}
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit b2a7c3d

Please sign in to comment.