-
Sub-task
-
Resolution: Fixed
-
P2
-
None
The JavaFX user thread currently exits if no windows are open. This is a problem for several reasons. First, an application or test harness may want to startup the FX User thread to run initialization code and/or load the app and only show the Stage after a period of time. Second, an application may want to run an animation timeline without ever displaying a stage. Third, the plugin tookit needs to be able to run code on the FX user thread prior to starting an application, and possibly after a window has been displayed and then closed.
To this end we will change the toolkit logic that keeps the FX User thread running. The thread will now exit on the lastWindowClose (i.e., when there are no more open windows after there has been at least one window made visible). The test framework (or applet plugin) can call PlatformImpl.setExitOnLastWindowClose(false) to suppress this and keep it running until Platform.exit is explicitly called.
To this end we will change the toolkit logic that keeps the FX User thread running. The thread will now exit on the lastWindowClose (i.e., when there are no more open windows after there has been at least one window made visible). The test framework (or applet plugin) can call PlatformImpl.setExitOnLastWindowClose(false) to suppress this and keep it running until Platform.exit is explicitly called.