summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-03-30 18:14:57 +0000
committerManolo Gouy <Manolo>2010-03-30 18:14:57 +0000
commitb2a7c3df5ee59ff0270d351e3eecefad39357397 (patch)
treefec297d1d080111400d54864d6cd2c5e9fe8b1e5 /src
parent065dfed2c3e6d8f6010cacf0366603ef82f665a6 (diff)
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
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];