PopupMenu dismisses directly

I have this issue with the PopupMenu for a long time but i know thought is was time to fix.

To reproduce this ‘bug/annoyance’ do the following.

  • Run the Juce demo
  • Select the widgets tab
  • Switch to another process on your system (i put my cursor in the Safari address bar)
  • Now right click (without selecting the Juce demo window first) on one of the Sliders in the widget demo to bring up it’s popup menu.
  • it popups and dismisses directly…

any thoughts on what might prevent this behaviour. It’s not a biggy but it’s annoying.
This happens with the juce_1_53 code on OSX.

Anyone else xperiencing this behaviour as well? Or am i being picky?

It’s just because the click event opens the menu, but OSX hasn’t allowed the app to take focus, so it realises that it’s not the foreground app, and cancels the menu. It’s a bit obscure - is it really a problem for you?

No it’s not a big problem, i won’t bother you with this anymore.
OSX does allow popup menu’s on windows that don’t have focus.
I want to keep our Juce app as close to a native OSX app as possible, so the behaviour should be the same. The best bet is to actually not allow the poupmenu to be shown as it won’t work anyway.

Yes, it’d just need a minor tweak. Remind me next week - I’m in the middle of other things right now…