Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

robstoddard

macrumors newbie
Original poster
Dec 27, 2007
3
0
I am working on a mod to the Vine (VNC) Server, to allow it to communicate with my company's video conference system. The problem keeping me from rolling this software out is the fact that in Leopard, the program ends up getting a duplicate dock icon which is "dead" to user input. I know why it does, it's because there is one program that runs as the user interface and a second program in the bundle that runs as the server in the background. The server process is run as an NSTask because the user interface needs to be able to control it. If I set LSBackground or LSUIElement in the Info.plist file, it removes both dock icons, which is not what I want.

Does anybody know of a way to remove the unwanted dock icon?

Thank you,
Rob Stoddard
 

LtRammstein

macrumors 6502a
Jun 20, 2006
570
0
Denver, CO
You can't.

For one you would have to view the entire source to see where it does that. Two, it's there to show how many connections there are accessing the computer.
 

robstoddard

macrumors newbie
Original poster
Dec 27, 2007
3
0
I did.

For one, the source was available, and I was modifying it.

It turns out that the second dock icon appeared because I was using the SIGALARM signal with alarm() to cause a "heartbeat" signal to go to the conference system. I suppose that since the process that was using this signal did not have a dock icon, the system supplied one. I am not a professional Mac programmer, I was given this task because I was the one programmer in the company willing to brave the Macintosh programming world. It turns out that just about all the timer mechanisms that I could find use the same signal to do their work, hence the same effect. So what I did to make the icon not appear was I spawned another thread and have that thread loop and sleep.

That solved my problem.

Thank you for you assistance anywhoo.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.