7
votes

I'd like to build an app that does not have a menubar, a dock icon, or sits in the app switcher. Basically, it should be like Quicksilver: I'd active it through a global hot key, say from Safari, and a little window appears, but Safari does not get inactive, neither does a different menubar show. I hope you understand what I mean...

How would I do that? I can prevent the dock icon, the app switcher, but I do not know how I can prevent the other apps from becoming inactive when my app's window shows or how I can remove the menu.

Thanks for any hints!

2

2 Answers

7
votes

Try searching for "LSUIElement". That should give you all the information you need.

(Specifically, this page in the documentation).

5
votes

As Dave already said, add

LSUIElement  YES

in your application's Info.plist file. That will get rid of icon and menu bar.

Then, to actually bring a window to the front at the appropriate time (e.g. when triggered through a global keyboard shortcut), you could do something like this:

ProcessSerialNumber psn = {0, kCurrentProcess};
SetFrontProcess(&psn);

[someWindow makeKeyAndOrderFront:nil];