Question

I have an application that lives in the menubar, without a main menu or dock icon. I have a button that triggers [NSApp orderFrontStandardAboutPanel:sender];. When that button is clicked, sometimes, the About panel becomes frontmost. Other times, however, the About panel opens, but behind other running application windows (to be clear, behind windows of OTHER applications, not behind my popover from the menubar). I'm not even sure where to start with debugging this - any suggestions?

Thanks.

Was it helpful?

Solution

NSApplication *app = [NSApplication sharedApplication];
[app activateIgnoringOtherApps:YES];
[NSApp orderFrontStandardAboutPanel:sender];

Please try the code above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top