--- old/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java 2013-12-20 14:33:23.686590600 +0400 +++ new/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java 2013-12-20 14:33:23.429575900 +0400 @@ -62,7 +62,6 @@ public static final boolean showDirtyRegions; public static final boolean showOverdraw; public static final boolean printRenderGraph; - public static final boolean shutdownHook; public static final int minTextureSize; public static final int minRTTSize; public static final int dirtyRegionCount; @@ -243,10 +242,6 @@ /* Setting for reference type used by Disposer */ refType = systemProperties.getProperty("prism.reftype"); - /* shutdown the pipeline on System.exit, ^c - needed with X11, so linux default is true */ - shutdownHook = getBoolean(systemProperties, "prism.shutdownHook", - PlatformUtil.isUnix()); - forcePow2 = getBoolean(systemProperties, "prism.forcepowerof2", false); noClampToZero = getBoolean(systemProperties, "prism.noclamptozero", false); --- old/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java 2013-12-20 14:33:25.751708700 +0400 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java 2013-12-20 14:33:25.540696600 +0400 @@ -244,19 +244,21 @@ renderer = QuantumRenderer.getInstance(); collector = PaintCollector.createInstance(this); pipeline = GraphicsPipeline.getPipeline(); - if (PrismSettings.shutdownHook) { - shutdownHook = new Thread("Glass/Prism Shutdown Hook") { - @Override public void run() { - dispose(); - } - }; - AccessController.doPrivileged(new PrivilegedAction() { - @Override public Void run() { - Runtime.getRuntime().addShutdownHook(shutdownHook); - return null; - } - }); - } + + /* shutdown the pipeline on System.exit, ^c + * needed with X11 and Windows, see RT-32501 + */ + shutdownHook = new Thread("Glass/Prism Shutdown Hook") { + @Override public void run() { + dispose(); + } + }; + AccessController.doPrivileged(new PrivilegedAction() { + @Override public Void run() { + Runtime.getRuntime().addShutdownHook(shutdownHook); + return null; + } + }); return true; } @@ -678,7 +680,6 @@ @Override public void exit() { notifyShutdownHooks(); - pulseTimer.stop(); ViewPainter.renderLock.lock(); try { @@ -697,14 +698,13 @@ public void dispose() { if (toolkitRunning.compareAndSet(true, false)) { + pulseTimer.stop(); renderer.stopRenderer(); - if (PrismSettings.shutdownHook) { - try { - Runtime.getRuntime().removeShutdownHook(shutdownHook); - } catch (IllegalStateException ignore) { - // throw when shutdown hook already removed - } + try { + Runtime.getRuntime().removeShutdownHook(shutdownHook); + } catch (IllegalStateException ignore) { + // throw when shutdown hook already removed } } }