-
Bug
-
Resolution: Fixed
-
P2
-
jfx11, jfx13, 8u251
-
x86
-
os_x_10.15
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8257833 | 8u291 | Kevin Rushforth | P2 | Closed | Fixed | b01 |
JDK-8262215 | jfx11.0.11 | Kevin Rushforth | P2 | Resolved | Fixed |
ADDITIONAL SYSTEM INFORMATION :
Java (also happens with versions 11 and 12 in OpenJDK, AdoptJDK and Zulu):
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment Zulu13.28+11-CA (build 13.0.1+10-MTS)
OpenJDK 64-Bit Server VM Zulu13.28+11-CA (build 13.0.1+10-MTS, mixed mode, sharing)
OSX:
System Version: macOS 10.15.1 (19B88)
Kernel Version: Darwin 19.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: #####
Username: #####
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 14:48
A DESCRIPTION OF THE PROBLEM :
On OSX Catalina, the global menubar of JavaFX applications is unresponsive upon program start. It works correctly after switching to another application and back again. This does not happen on earlier versions of OSX. Verified in Java 11, 12 and 13.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. compile and run a JavaFX application using a menubar with useSystemMenu(true)
2. click on menuitems in the menubar
3. switch to any other application
4. switch back to the JavaFX application
5. click on menuitems in the menubar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be possible to select menuitems in steps 2 and 5.
ACTUAL -
The menu is shown but does not response to mouse and keyboard events in step 2. step 5 works as expected.
---------- BEGIN SOURCE ----------
package hellofx;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) {
String javaVersion = System.getProperty("java.version");
String javafxVersion = System.getProperty("javafx.version");
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
MenuBar menuBar = new MenuBar(new Menu("TEST"));
menuBar.setUseSystemMenuBar(true);
Scene scene = new Scene(new VBox(menuBar, new StackPane(l)), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
Java (also happens with versions 11 and 12 in OpenJDK, AdoptJDK and Zulu):
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment Zulu13.28+11-CA (build 13.0.1+10-MTS)
OpenJDK 64-Bit Server VM Zulu13.28+11-CA (build 13.0.1+10-MTS, mixed mode, sharing)
OSX:
System Version: macOS 10.15.1 (19B88)
Kernel Version: Darwin 19.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: #####
Username: #####
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 14:48
A DESCRIPTION OF THE PROBLEM :
On OSX Catalina, the global menubar of JavaFX applications is unresponsive upon program start. It works correctly after switching to another application and back again. This does not happen on earlier versions of OSX. Verified in Java 11, 12 and 13.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. compile and run a JavaFX application using a menubar with useSystemMenu(true)
2. click on menuitems in the menubar
3. switch to any other application
4. switch back to the JavaFX application
5. click on menuitems in the menubar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be possible to select menuitems in steps 2 and 5.
ACTUAL -
The menu is shown but does not response to mouse and keyboard events in step 2. step 5 works as expected.
---------- BEGIN SOURCE ----------
package hellofx;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) {
String javaVersion = System.getProperty("java.version");
String javafxVersion = System.getProperty("javafx.version");
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
MenuBar menuBar = new MenuBar(new Menu("TEST"));
menuBar.setUseSystemMenuBar(true);
Scene scene = new Scene(new VBox(menuBar, new StackPane(l)), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8262215 [macos 10.15] System menu bar does not work initially on macOS Catalina
- Resolved
-
JDK-8257833 [macos 10.15] System menu bar does not work initially on macOS Catalina
- Closed
- duplicates
-
JDK-8254669 [macos] MenuBar.useSystemMenuBarProperty Does Not Work
- Closed
- relates to
-
JDK-8257835 Brief flash in terminal window when launching FX app on macOS
- Open
-
JDK-8283590 [macos] Application window not activated when run from terminal with Secure Keyboard Entry set
- Open
-
JDK-8315657 Application window not activated in macOS 14 Sonoma
- Resolved
(1 relates to, 2 links to)