aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_ps_init.c
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-01-15 09:18:49 +0100
committerDan Gudmundsson <[email protected]>2013-01-15 09:18:49 +0100
commit0e044f3525d22de4c4c471f601de50ad3acda304 (patch)
treedfbbcc31814b0890fcb7774a48cf43322b29ac94 /lib/wx/c_src/wxe_ps_init.c
parentfdd0b38e2c85d897a240e5f8f79e268c6540dbfd (diff)
parentc384a91846f7d0aff189fb51d1d502330d7abef4 (diff)
downloadotp-0e044f3525d22de4c4c471f601de50ad3acda304.tar.gz
otp-0e044f3525d22de4c4c471f601de50ad3acda304.tar.bz2
otp-0e044f3525d22de4c4c471f601de50ad3acda304.zip
Merge branch 'dgud/wx/fix-wx-2.9-compat/OTP-10407'
* dgud/wx/fix-wx-2.9-compat/OTP-10407: (26 commits) wx: Fix comments wx: Workaround wx-2.9 bugs wx: Mac fixes wx: Fix demo and tests wx: Allow 64 bits compilation on mac, requires wxWidgets-2.9 appmon: Move runtime part to runtime_tools app reltool: fix wxWidgets-2.9 compability debugger: Fix 2.9 compat observer: Fix check for graphics contexts Observer: Fix distribution dialog observer: Fix font sizes wx: Fix the demo wx: Fix loading icons and cursors in Windows wx: Remove unnecessary casts wx: Fix changed getfunctions wx: Depricate wxCursor new functions wx: Fix int to enum wx: Include correct m4 file in 2.9 wx: Update examples so they work with both wxWidgets 2.8 and 2.9 wx: Modify tests so they work on wxWidgets-2.9 ...
Diffstat (limited to 'lib/wx/c_src/wxe_ps_init.c')
-rw-r--r--lib/wx/c_src/wxe_ps_init.c5
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