views:

12

answers:

1

I made a preference pane and every time it loads the System Preferences loses focus. If I remove all controls from my pref pane window the issue will not occur but as soon as there's any sort of image or control in the window it occurs.

What am I missing?

A: 

Nevermind. The pref pane is launching another app so that's why it's losing focus...

Luc
What method are you using to launch the app? There's probably a way to launch the app in the background, so System Preferences does not lose focus.
mipadi
There is. Both NSWorkspace and Launch Services support launching in the background.
Peter Hosey
Figured it out: just use NSWorkspaceLaunchWithoutActivation with openURLs.
Luc