From b9e94f9c45e070beca79b286c6c47a325b38dbdb Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 14 Dec 2016 13:29:56 -0700 Subject: [PATCH] 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 --- gui-lib/mred/private/wx/cocoa/queue.rkt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui-lib/mred/private/wx/cocoa/queue.rkt b/gui-lib/mred/private/wx/cocoa/queue.rkt index 7a8fdbae..1fda82ae 100644 --- a/gui-lib/mred/private/wx/cocoa/queue.rkt +++ b/gui-lib/mred/private/wx/cocoa/queue.rkt @@ -34,7 +34,6 @@ yield) (import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray) -(import-protocol NSApplicationDelegate) ;; Extreme hackery to hide original arguments from ;; NSApplication, because NSApplication wants to turn @@ -52,7 +51,7 @@ (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]) (queue-quit-event)