From 9c5b78e998c7cf3e6a0bfe9848b7a47f18562ef3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 9 Sep 2011 19:22:42 -0600 Subject: [PATCH] suppress an error message (related to Mac 10.7) We could try to figure out the current state of the process, instead, but it seems like too much work. --- collects/mred/private/wx/cocoa/queue.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index 725fd65708..00c363abd7 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -108,7 +108,12 @@ -> _OSStatus)) (let ([v (TransformProcessType (make-ProcessSerialNumber 0 kCurrentProcess) kProcessTransformToForegroundApplication)]) - (unless (zero? v) + (unless (or (zero? v) + ;; As of Mac OS X 10.7, TransformProcessType() complains + ;; if the application is already a foreground application, + ;; so just ignore that error (even though it correctly flagged + ;; a bug in the `_ProcessSerialNumber' definition at one point). + (= v -50)) (log-error (format "error from TransformProcessType: ~a" v)))) (define app-delegate (tell (tell MyApplicationDelegate alloc) init))