View Full Version : Duplicate dock icons with Vine Server
Feb 20, 2008, 10:44 AM
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?
Feb 20, 2008, 12:01 PM
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.
Feb 20, 2008, 02:07 PM
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.