Mac menu bar disabled if app doesn't have focus during loading


#1

Hi all,

I’m having an issue whereby the native Mac menu bar is greyed out if the app doesn’t have focus during loading. The easiest way to make this happen is to build it in XCode, navigate to some other app (e.g. check some email) and then come back to the app once built and it will be greyed out. There are examples of user behaviour in my app that cause this also.

Any idea what I might be doing wrong? I can post code examples but it is hard to know which parts to share as I’m not sure where the issue could be coming from.

Thanks in advance,

Adam


#2

Do you mean the menu bar itself is greyed out or items within the menu bar’s sub-menus are disabled?


#3

It’s like this…09


#4

And I can still use the keyboard shortcuts, just the menu items are greyed out


#5

Any thoughts on this? Would love to solve this one


#6

I’d really appreciate some help on this if anyone had any thoughts on why this might be happening.

Thanks,

Adam


#7

Can you post a minimal code example that displays the problem? I’ve tried to reproduce it with the MenusDemo in JUCE/examples by adding setMenuBarPosition (MenuBarPosition::global); at line 167 of MenusDemo.h but the menu items are active when I re-focus the app after launching.