Details
-
Bug
-
Resolution: Fixed
-
P2
-
jfx11, 8, jfx22
-
b16
-
os_x
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8319193 | jfx21.0.2 | Jose Pereda | P2 | Resolved | Fixed | b03 |
JDK-8319194 | jfx17.0.10 | Jose Pereda | P2 | Resolved | Fixed | b01 |
JDK-8319558 | 8u411 | Kevin Rushforth | P2 | Resolved | Fixed | b01 |
JDK-8319634 | 8u401 | Ambarish Rapte | P2 | Closed | Fixed | b05 |
Description
After that fix, and on macOS 14.0+, when apps are created via jpackage, launching them from their shortcut icon works fine, as they get to the foreground and are properly activated.
However, when they are launched from the command line, they get to the foreground but they are not activated, and the user needs to click on them for that, otherwise, the activated application is still the Terminal (or IDE) app from they were launched.
For a quick test, install SceneBuilder with JavaFX 21.0.1 (from https://github.com/gluonhq/scenebuilder/releases/download/21.0.1-RC/SceneBuilder-21.0.1-RC-aarch64.dmg or https://github.com/gluonhq/scenebuilder/releases/download/21.0.1-RC/SceneBuilder-21.0.1-RC-amd64.dmg).
Launch SceneBuilder from the shortcut icon:
(from shortcut.png)
Launching SceneBuilder from command line with:
$ /Applications/SceneBuilder.app/Contents/MacOS/SceneBuilder
(from commandline.png)
This can also be reproduced easily launching any JavaFX application from command line:
java --module-path ... --add-modules javafx.controls myApp
mvn javafx:run
gradle run
...
With some debugging, it can be seen that the launching process stops at applicationDidFinishLaunching:
[main:0] Java_com_sun_glass_ui_mac_MacApplication__1initIDs
[main:0] Java_com_sun_glass_ui_mac_MacApplication__1runLoop
[main:0] waiting for [glass started]
[main:1] GlassApplication:runLoop ENTER
[main:0] waiting for [glass started]
[main:0] waiting for [glass started]
[main:0] waiting for [glass started]
[main:1] GlassApplication:applicationWillFinishLaunching
[main:1] Java_com_sun_glass_ui_mac_MacApplication__1isTriggerReactivation
[main:1] Java_com_sun_glass_ui_mac_MacApplication__1getScreens
[main:1] Java_com_sun_glass_ui_mac_MacApplication__1getVideoRefreshPeriod
[main:1] CVDisplayLinkGetActualOutputVideoRefreshPeriod: 0.016667
[main:1] GlassApplication:application:openFiles
[main:1] GlassApplication:applicationDidFinishLaunching
so these are missing:
[main:1] GlassApplication:applicationWillBecomeActive
[main:1] GlassApplication:applicationDidBecomeActive
Attachments
Issue Links
- backported by
-
JDK-8319193 Application window not always activated in macOS 14 Sonoma
-
- Resolved
-
-
JDK-8319194 Application window not always activated in macOS 14 Sonoma
-
- Resolved
-
-
JDK-8319558 Application window not always activated in macOS 14 Sonoma
-
- Resolved
-
-
JDK-8319634 Application window not always activated in macOS 14 Sonoma
-
- Closed
-
- relates to
-
JDK-8315657 Application window not activated in macOS 14 Sonoma
-
- Resolved
-
- links to
-
Commit openjdk/jfx17u/22bd6571
-
Commit openjdk/jfx21u/1b18effd
-
Commit openjdk/jfx/a11faa96
-
Review openjdk/jfx17u/166
-
Review openjdk/jfx21u/23
-
Review openjdk/jfx/1273