better fix for TransformProcessType issue

GRacket registers witht a global table to indicate that
no transform is needed. (This change was intended to address
a 64-bit problem on Lion. It didn't help, but this seems
better than ignoring an error.)

original commit: 9d4fcd8e84e8663526420ff2de4b8b67869442c9
This commit is contained in:
Matthew Flatt 2011-09-10 10:20:37 -06:00
parent 480477cbd4
commit 691b4c33ce

View File

@ -106,15 +106,11 @@
(define-appserv TransformProcessType (_fun _ProcessSerialNumber-pointer
_uint32
-> _OSStatus))
(let ([v (TransformProcessType (make-ProcessSerialNumber 0 kCurrentProcess)
kProcessTransformToForegroundApplication)])
(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))))
(unless (scheme_register_process_global "PLT_IS_FOREGROUND_APP" #f)
(let ([v (TransformProcessType (make-ProcessSerialNumber 0 kCurrentProcess)
kProcessTransformToForegroundApplication)])
(unless (zero? v)
(log-error (format "error from TransformProcessType: ~a" v)))))
(define app-delegate (tell (tell MyApplicationDelegate alloc) init))
(tellv app setDelegate: app-delegate)