Hrm... I tried this (needs to be in a separate C file due to type conflicts): #include <ApplicationServices/ApplicationServices.h> int moveToForeground() { ProcessSerialNumber psn = { 0, kCurrentProcess }; OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication); if( returnCode == 0) { //SetFrontProcess(&psn); } return (int)returnCode; } and called moveToForeground() before server_main(). this was added to Info.plist: <key>LSBackgroundOnly</key> <true/> returnCode was 0 (success), but the app didn't show up in the dock. I'm thinking this just won't work and I'm willing to settle with the current situation for now (since it's still better than before)... but still not optimal... --Jeremy On Dec 4, 2007, at 19:48, Jeremy Huddleston wrote:
It looks like it can work. Instead of making it always foreground and pushing to the background for the launcher case, I'll make it background and push to the foreground in the server case.
--Jeremy
On Dec 4, 2007, at 19:45, Peter O'Gorman wrote:
Peter O'Gorman wrote:
So, I guess you'd need to look at the docs for TransformProcessType().
Or not :(
http://developer.apple.com/documentation/Carbon/Reference/Process_Manager/Re... /apple_ref/c/func/TransformProcessType http://www.cocoadev.com/index.pl?TransformProcessType
Peter -- Peter O'Gorman http://pogma.com _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/xquartz-dev