diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index 3557c15f..469e08d6 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -45,7 +45,9 @@ (if (ptr-equal? (selector openPreferences:) (tell #:type _SEL menuItem action)) (not (eq? (application-pref-handler) nothing-application-pref-handler)) - (super-tell #:type _BOOL validateMenuItem: menuItem))]) + (super-tell #:type _BOOL validateMenuItem: menuItem))] + [-a _BOOL (application: [_id theApplication] openFile: [_NSString filename]) + (queue-file-event (string->path filename))]) (tellv app finishLaunching) diff --git a/collects/mred/private/wx/common/queue.rkt b/collects/mred/private/wx/common/queue.rkt index 452528fc..e7bc3052 100644 --- a/collects/mred/private/wx/common/queue.rkt +++ b/collects/mred/private/wx/common/queue.rkt @@ -44,6 +44,7 @@ queue-quit-event queue-prefs-event + queue-file-event begin-busy-cursor end-busy-cursor @@ -450,6 +451,12 @@ ;; called in event-pump thread (queue-event main-eventspace (application-pref-handler) 'med)) +(define (queue-file-event file) + ;; called in event-pump thread + (queue-event main-eventspace (lambda () + ((application-file-handler) file)) + 'med)) + (define (begin-busy-cursor) (let ([e (current-eventspace)]) (atomically