diff options
author | gkw <[email protected]> | 2004-08-17 05:56:47 +0000 |
---|---|---|
committer | gkw <[email protected]> | 2004-08-17 05:56:47 +0000 |
commit | a74c41bb00bb2fd0a6d2a5470332dbaa1e53958c (patch) | |
tree | 84a039ad3c4b0ac00d19c0c60c2f567e7595a5e4 | |
parent | 64f1111b0238ee93b8d1f1eaf70e1a5f9f10ad19 (diff) |
addShutdownHook needed to be wrapped in a call to AccessController.doPrivileged in order to work with applets and Web Start.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@153 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java index 6603dc2eb..0f4b1d03c 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java @@ -40,10 +40,11 @@ package net.java.games.jogl.impl.windows; import java.awt.Component; -import java.awt.Frame; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.Rectangle; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -70,7 +71,12 @@ public class WindowsGLContextFactory extends GLContextFactory { private static Set/*<GraphicsDevice >*/ pendingContextSet = new HashSet(); public WindowsGLContextFactory() { - Runtime.getRuntime().addShutdownHook( new ShutdownHook() ); + AccessController.doPrivileged( new PrivilegedAction() { + public Object run() { + Runtime.getRuntime().addShutdownHook( new ShutdownHook() ); + return( null ); + } + }); } public GraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities, |