MenuBar in macOS Catalina

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

thoray,
You can try to ping on the ticket to see if Vadim/Stefan can look into it.
Or you can try to debug it and see what is happening...

Thank you.
hpanderson
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Nov 06, 2019 3:39 pm

Re: MenuBar in macOS Catalina

Post by hpanderson »

I'm also having this issue, which is annoying, but in the final packaged version of our product it does not occur. I thought it might have to do with code signing, but I signed the unpackaged binary and still get the bug.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

Hi,
What do you mean by "final packaged version"?
What is different from the one you did have the issue?

Thank you.
hpanderson
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Nov 06, 2019 3:39 pm

Re: MenuBar in macOS Catalina

Post by hpanderson »

I guess "Bundle" is the proper macOS term. It's inside a .app folder, with an Info.plist file. We use CMake/CPack to create it.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

Hi,
So when the application is in the Bundle you don't have an issue?
Then it is not a bug, but OSX feature. Every single application on OSX shuold be inside the Bundle. That's how Apple considers the application to be an official binary.

If the application is not inside the Bundle and its just a plain binary - it is NOT considered GUI application and therefore does not have a menu.

Thank you.
hpanderson
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Nov 06, 2019 3:39 pm

Re: MenuBar in macOS Catalina

Post by hpanderson »

ONEEYEMAN wrote: Tue Mar 17, 2020 7:07 pm Hi,
So when the application is in the Bundle you don't have an issue?
That's correct.
Then it is not a bug, but OSX feature. Every single application on OSX shuold be inside the Bundle. That's how Apple considers the application to be an official binary.

If the application is not inside the Bundle and its just a plain binary - it is NOT considered GUI application and therefore does not have a menu.

Thank you.
I'm not intimately familiar with macOS, so what you're saying could be correct. Prior to Catalina I was able to build and immediately launch the binary from the terminal with no problems with the menu. In addition, in Catalina, changing focus away and back to the program re-enables the menu. It's less than ideal to have to do that every time we start the application during development. It's not a problem for our end-users, so it's a minor annoyance we can live with.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

Hi,
Do you use Xcode to build and debug the application?
When you use Xcode it will automatically create an Application Bundle. So when you start the application it will be launched (not started) as Application Bundle.
If you don't use Xcode - then you shuold create an Application Bundle every time you build the application.

I guess Apple do NOT want people to work with basic application binary even during development anymore. They push to use AppBundle for everything.

Thank you.
hpanderson
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Nov 06, 2019 3:39 pm

Re: MenuBar in macOS Catalina

Post by hpanderson »

We use CMake from the command line. I will try making a bundle each build, that is sensible. Thanks.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

Hi,
"CMake" is a 3rd party tool. It is not designed to make an Application Bundle on OSX.

Thank you.
chrism238
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sun Feb 17, 2013 6:45 pm

Re: MenuBar in macOS Catalina

Post by chrism238 »

I appreciate that the number of us interested in this issue is quite small, but I can confirm that a full clean and recompile of wx3.1.3 on the latest Catalina 10.15.4 and Xcode 11.4 does not fix the problem.

If it's any consolation, the exact same problem exists with the latest Tcl/Tk (re)installed using brew.
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith »

Has anyone made any progress on this?

I'm running into this exact problem compiling an app using wx 3.1.3 with OSX 10.15 SDK under Catalina.
BeerSmith.com
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN »

Hi,
Are you building a Bundle?

What is an exact OSX version you are trying it on?

Also, what is you minimum deployment version from the configure?

Thank you.
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith »

Hi,
- Yes I'm building an application bundle
- The deployment target is currently 10.9 but I could go higher
- I'm apparently running 10.14.6 Mojave (thought it was Catalina) but built wx and the app with XCode 11.3.1 and the 10.15 SDK
- I just downloaded the older XCode 11.3 so I can recompile wx 3.1.3 using SDK 10.14 - probably will recompile tomorrow morning
BeerSmith.com
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith »

Ok,
I tried recompiling wx 3.1.3 and my app with XCode 10.3 (SDK 10.14, min version 10.9) the problem persists. The menu bar is being set for the main frame (I walked through the menu building code) but it is not showing up when the frame is shown.

Next I'm going to build a super simple menu and see if I can get it to show up at all. Failing that I may have to roll back to an earlier wx build.
BeerSmith.com
chrism238
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sun Feb 17, 2013 6:45 pm

Re: MenuBar in macOS Catalina

Post by chrism238 »

We're probably tired of (my) such attempts, but have now recompiled everything :

- Catalina 10.15.4 with Supplemental update,
- Xcode 11.4.1,
- wxWidgets 3.1.3
- my app
- menu sample code .../wxWidgets-3.1.3/samples/menu

still no change :-(
Time to dive in, and look for source differences between 3.1.3 and 3.0 in this area. And the equivalent lastest for Tcl/Tk.
Post Reply