Index: src/video/cocoa/cocoa_v.mm =================================================================== --- src/video/cocoa/cocoa_v.mm (revision 17622) +++ src/video/cocoa/cocoa_v.mm (working copy) @@ -170,16 +170,15 @@ static void setupApplication() { - CPSProcessSerNum PSN; + ProcessSerialNumber psn = { 0, kCurrentProcess }; /* Ensure the application object is initialised */ [NSApplication sharedApplication]; /* Tell the dock about us */ - if (!CPSGetCurrentProcess(&PSN) && - !CPSEnableForegroundOperation(&PSN, 0x03, 0x3C, 0x2C, 0x1103) && - !CPSSetFrontProcess(&PSN)) { - [NSApplication sharedApplication]; + OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication); + if( returnCode != 0) { + DEBUG(driver, 0, "Could not bring the application to front. Error %d", returnCode); } /* Set up the menubar */