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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Mon Mar 16, 2020 12:33 pm

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 » Tue Mar 17, 2020 1:14 pm

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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Tue Mar 17, 2020 2:18 pm

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 » Tue Mar 17, 2020 2:45 pm

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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Tue Mar 17, 2020 7:07 pm

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 » Tue Mar 17, 2020 7:45 pm

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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Tue Mar 17, 2020 8:05 pm

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 » Wed Mar 18, 2020 1:39 pm

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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Wed Mar 18, 2020 2:11 pm

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: 15
Joined: Sun Feb 17, 2013 6:45 pm

Re: MenuBar in macOS Catalina

Post by chrism238 » Mon Apr 06, 2020 4:34 am

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
Earned a small fee
Earned a small fee
Posts: 24
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith » Tue Apr 21, 2020 12:47 am

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: 4170
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MenuBar in macOS Catalina

Post by ONEEYEMAN » Tue Apr 21, 2020 3:45 am

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
Earned a small fee
Earned a small fee
Posts: 24
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith » Tue Apr 21, 2020 3:52 am

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
Earned a small fee
Earned a small fee
Posts: 24
Joined: Mon Mar 07, 2011 8:39 pm

Re: MenuBar in macOS Catalina

Post by BeerSmith » Tue Apr 21, 2020 7:07 pm

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: 15
Joined: Sun Feb 17, 2013 6:45 pm

Re: MenuBar in macOS Catalina

Post by chrism238 » Tue Apr 21, 2020 7:18 pm

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