-
Enhancement
-
Resolution: Unresolved
-
P4
-
7u6
-
Mac OS X 10.7.4 JavaFX 2.2.0-b21
If you call Platform.setImplicitExit(false) and then hide the main stage, the app's icon remains in the dock.
On Windows or Linux, by contrast, the taskbar icon goes away.
I'm attaching a completely trivial test case -- run it, then close the window using its close button. Note that the icon is still in the dock. Clicking the icon unsurprisingly does not open the window (that's okay, except for the user experience of there being a dock icon that doesn't open anything when you click it). Furthermore, choosing "Quit" from the dock menu doesn't kill the program.
The point of this is to implement a "minimize to tray" functionality, where the program does useful stuff in the background and provides a system tray icon to control the program when it's hidden and potentially reopen the main stage. That would be a much more complicated test case, complicated further by the need to launch as an AWT app to get access to the tray before starting JavaFX. Curiously, when I run that much more complicated program, the "Quit" item does kill the app, though I haven't investigated what's different about it.
http://javafx-jira.kenai.com/browse/RT-20398 seems like it might be related.
On Windows or Linux, by contrast, the taskbar icon goes away.
I'm attaching a completely trivial test case -- run it, then close the window using its close button. Note that the icon is still in the dock. Clicking the icon unsurprisingly does not open the window (that's okay, except for the user experience of there being a dock icon that doesn't open anything when you click it). Furthermore, choosing "Quit" from the dock menu doesn't kill the program.
The point of this is to implement a "minimize to tray" functionality, where the program does useful stuff in the background and provides a system tray icon to control the program when it's hidden and potentially reopen the main stage. That would be a much more complicated test case, complicated further by the need to launch as an AWT app to get access to the tray before starting JavaFX. Curiously, when I run that much more complicated program, the "Quit" item does kill the app, though I haven't investigated what's different about it.
http://javafx-jira.kenai.com/browse/RT-20398 seems like it might be related.
- duplicates
-
JDK-8093206 Cannot hide Mac dock icon for utility-like apps using LSUIElement property
-
- Closed
-
- relates to
-
JDK-8087607 Mac: Quit won't exit an app after Platform.setImplicitExit(false)
-
- Open
-