Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092032

Mac: implement support for hiding the dock icon

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u6
    • javafx
    • 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.

            Unassigned Unassigned
            bmellejfx Bill van Melle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: