NSMenuFX
NSMenuFX copied to clipboard
Focus Issue on Mac OS Big Sur and above
When creating a menubar, it is not accessible (i.e. cannot be clicked) unless you do an ALT-TAB application switch twice. Then everything runs fine.
I tested it under Mac OS Big Sur and Mac OS Ventura.
This is the code that generates the menus
MenuToolkit tk = MenuToolkit.toolkit();
MenuBar bar = new MenuBar();
Menu applicationMenu = tk.createDefaultApplicationMenu(APP_NAME, aboutStageBuilder.build());
bar.getMenus().addAll(applicationMenu,
this.menu_properties);
//remove the "traditional" menu bars
parent.getChildren().remove(this.menubar);
parent.getChildren().remove(this.menubar_version);
// set the new menu bar.
tk.setAppearanceMode(AppearanceMode.AUTO);
tk.setGlobalMenuBar(bar);
I guess it is related to this issue https://bugs.openjdk.org/browse/JDK-8233678 that is also described in der README. Maybe using another JavaFX version solves this issue.