diff options
author | Dan Gudmundsson <[email protected]> | 2012-12-21 13:31:50 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-01-09 11:44:30 +0100 |
commit | 60f0eeddd23306efa3d5993c320b31e7ce942464 (patch) | |
tree | 87ccad49303477dee24806414c2f2015e2eb6bd8 /lib/wx/c_src/wxe_ps_init.c | |
parent | 7108397ed9bccfc4cf9ace23f0d29dc3e69b31da (diff) | |
download | otp-60f0eeddd23306efa3d5993c320b31e7ce942464.tar.gz otp-60f0eeddd23306efa3d5993c320b31e7ce942464.tar.bz2 otp-60f0eeddd23306efa3d5993c320b31e7ce942464.zip |
wx: Mac fixes
Diffstat (limited to 'lib/wx/c_src/wxe_ps_init.c')
-rw-r--r-- | lib/wx/c_src/wxe_ps_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/wx/c_src/wxe_ps_init.c b/lib/wx/c_src/wxe_ps_init.c index a85f751024..025ea90f8b 100644 --- a/lib/wx/c_src/wxe_ps_init.c +++ b/lib/wx/c_src/wxe_ps_init.c @@ -25,12 +25,17 @@ #include <Cocoa/Cocoa.h> #include <objc/objc-runtime.h> +extern OSErr CPSSetProcessName (ProcessSerialNumber *psn, char *processname); + void * wxe_ps_init() { ProcessSerialNumber psn; NSAutoreleasePool *pool; // Enable GUI GetCurrentProcess(&psn); + char *app_title = getenv("WX_APP_TITLE"); + // Undocumented function (but no documented way of doing this exists) + CPSSetProcessName(&psn, app_title?app_title:"Erlang"); TransformProcessType(&psn, kProcessTransformToForegroundApplication); SetFrontProcess(&psn); // Enable Cocoa calls from Carbon app |