NSMenuFX icon indicating copy to clipboard operation
NSMenuFX copied to clipboard

Focus Issue on Mac OS Big Sur and above

Open TiPunch69 opened this issue 2 years ago • 1 comments

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);

TiPunch69 avatar Nov 17 '22 14:11 TiPunch69

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.

0x4a616e avatar Nov 17 '22 18:11 0x4a616e