rick
rick

Reputation: 1125

about panel in menubar application is not frontmost when activated

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.

Upvotes: 2

Views: 517

Answers (1)

6 1
6 1

Reputation: 1074

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

Please try the code above.

Upvotes: 5

Related Questions