I am working on a utility application that controls other running applications. On certain input event my application displays a window, user can pick some operation from the window, the window disappears and control returns to the previous app. My problem is that clicking in my app’s window activates my application, thus removing focus from the previous application’s window. I can re-activate the previous application when my window closes, but I’d rather keep the original application activated all the time. Is that possible?
2 Answers
6
votes
It's quite easy to to, just make your window an instance of NSPanel (a subclass of NSWindow
), and set it as non-activating in Xcode/IB (or create it programatically, with NSNonactivatingPanelMask
in the style mask).