How to make the O window the front-most window in a Cocoa application without an interface?

I am creating a Cocoa application that works as an item in the status bar. This application has an About window and an element to activate this window using Cocoa's standard mechanism for this ( -[NSApplication orderFrontStandardAboutPanel:]). Naturally, all this is automatically connected.

It works great, except for one thing: unlike most About Windows, it appears under all other windows, not the top. I believe that this is due to the fact that the application does not have a user interface, so all of its windows are automatically under other windows. Is there a way I can connect to the NSApplication engine to display the About window so that I can send it to the front and make it respond to ⌘-W so that it can be closed from the keyboard? I stayed in the docs for NSApplication, but there is no way to get a link to the About window, which I can see so that I can show it on top.

+5
source share
1 answer

NSApplication About, ?

orderFrontStandardAboutPanel:.

, : Windows, , . , , , [].

[NSApp activateIgnoringOtherApps:YES].

, " ": LSUIElement, , LSBackgroundOnly .

+6

All Articles