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

[macosx] Enhance embedded mode support

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None
    • Environment:

      Mac

      Description

      After a fix for JDK-8005465 FX and AWT can be started in any order, both headful. However, there's still some minor problems remain with the order of termination (JDK-8006320).

      In terms of this Enhancement, we would like to introduce a protocol, most likely internal, for several GUI Java toolkits to co-exist in one JVM, and be able to terminate gracefully no matter which of toolkits finishes first.

      The first attempt was made with a fix for JDK-8005465 (see http://mail.openjdk.java.net/pipermail/awt-dev/2012-December/004018.html). The proposed solution suggested to initiate an activity on the native event loop which would indicate that a toolkit is still alive, and hence the app as a whole should not be terminated yet.

      However, this solution isn't ideal for battery-powered devices. We might want to explore other possibilities. E.g. introduce a Java class (sun.misc.GUITermiantion or alike), and establish a protocol for GUI toolkits to maintain a usage counter through this new class. Once the counter goes down to zero, an event will be fired which would allow the main (embedder) toolkit to terminate the whole application.

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              anthony Anthony Petrov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: