So I thought I had covered my bases, but apparently I’m missing a key step or two.
I have an NSPanel that is displayed (makeKeyAndOrderFront:) when an NSStatusItem is pressed. Things work great, but as the NSPanel displays a title bar, the panel is also draggable. (This is undesired.)
The first screenshot shows the panel with “Title Bar” enabled in Interface Builder, in the Appearance category. (Sorry for the blur, things are still under lock and key for now.)

The only change that is made in Interface Builder is unchecking the “Title Bar” checkbox. I then save and re-run, and that’s what you see in the second screenshot. While a slight shadow appears, the panel does not.

Things I’ve tried:
-
I’ve subclassed the NSPanel and returned
YESforcanBecomeKeyWindowandcanBecomeMainWindowafter a bit of research, but (prior to subclassing) these methods both returnedNOregardless of whether I was using a Title Bar or not. So I don’t think this is the issue. -
I’ve ensured that the frame for the NSPanel is properly set. It has a good height, and the origin is set properly as well.
Edit: Forgot to Mention:
The application is a menu-bar-only application. In the screenshot below, note that an additional entry was added to Info.plist to enforce this.

I’ve had problems with this in the past. I was able to resolve it by first “ignoring” other apps, then making it the key window. Give it a shot and see if it works for you.
Also, try setting the window level to
NSPopUpMenuWindowLevelduring initialization.I have also had problems with the way that nib files are loaded on Mac OS X. They’re loaded “lazily”, which means that they won’t be initialized until they’re needed. This causes a problem when you’re wanting to set specifics on the window, but you can’t because
awakeFromNibdoesn’t seem to be called, due to lazy nib loading. To fix this, here’s what I’ve done in the past. In your delegate (or wherever you initialize your window), kick the window into action by accessing thewindowproperty on the initialized class:By doing so, you’re forcing the nib to initialize. That way, when the user clicks the menubar icon the nib is already initialized, and
awakeFromNibhas already been called.