macOS: don't try to declare implementation of NSApplicationDelegate

There's no run-time representation of `NSApplicationDelegate`, so
trying to declare it ands up adding NULL as a protocol to the
Objective-C class for the application delegate.

Adding NULL that way leads to a crash on 10.12.1+ with TouchBar
support.

Closes racket/racket#1520
This commit is contained in:
Matthew Flatt 2016-12-14 13:29:56 -07:00
parent e627cdcba5
commit b9e94f9c45

View File

@ -34,7 +34,6 @@
yield) yield)
(import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray) (import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray)
(import-protocol NSApplicationDelegate)
;; Extreme hackery to hide original arguments from ;; Extreme hackery to hide original arguments from
;; NSApplication, because NSApplication wants to turn ;; NSApplication, because NSApplication wants to turn
@ -52,7 +51,7 @@
(define got-file? #f) (define got-file? #f)
(define-objc-class RacketApplicationDelegate NSObject #:protocols (NSApplicationDelegate) (define-objc-class RacketApplicationDelegate NSObject ;; note: NSApplicationDelegate doesn't exist at run time
[] []
[-a _NSUInteger (applicationShouldTerminate: [_id app]) [-a _NSUInteger (applicationShouldTerminate: [_id app])
(queue-quit-event) (queue-quit-event)