NSBorderlessWindowMask Window will not show NSPanels if not at the very beginning of the window

I have a window that is set using NSBorderlessWindowMask as well as kCGDesktopWindowLevel. When the NSPanel is expected to appear, for example from the Dock Icon menu or the Status Bar Item menu, the NSPanel will not appear unless the application is the largest window.

So this program at this time only has a status menu item (think about how QuickSilver runs), and when I select Preferences from my menu, it is set to display the Preferences pane using the Makekeyandorderfront, however, if only you haven't launched the application and did nothing, when you select "Settings" nothing happens.

I found that when I select the Sparkle Check for Updates menu item, the check for update panel appears, and then the settings panel appears, which I told to open.

So, it looks like makekeyandorderfront doesn't actually bring it to the front.

Does anyone know how to fix this? Should I call something other than makekeyandorderfront or perhaps something related to this?

Thank you in advance

+1


source to share


1 answer


The default panels are designed to work this way. They are designed as helper windows for your application and always disappear when the application is deactivated. You will probably also run into problems when the panel becomes key ... but to fix the disappearing panel issue please send this message to your panel:

[panelObject setHidesOnDeactivate:NO];

      



You should probably use real NSWindow objects instead of NSPanel objects, but since I don't know much about how your application works, you'll have to learn it yourself. More information on the differences between panels and windows can be found here: Window Programming Guide

+2


source







All Articles