From 34427b80f72df405bff5a88bf0275c185eba983e Mon Sep 17 00:00:00 2001 From: kappa1 Date: Wed, 14 Apr 2010 22:34:43 +0000 Subject: [PATCH] fix: When using unsigned jars with signed lwjgl jars it fails when creating a Display on linux with an AccessController error. This is due to the new XRandR class missing a AccessController.doPriviledged method when it requires out of sandbox access. (LWJGL Applet Distribution is borken on linux without this fix) --- src/java/org/lwjgl/opengl/XRandR.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/opengl/XRandR.java b/src/java/org/lwjgl/opengl/XRandR.java index 70f48680..d9876b9a 100644 --- a/src/java/org/lwjgl/opengl/XRandR.java +++ b/src/java/org/lwjgl/opengl/XRandR.java @@ -40,6 +40,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Pattern; +import java.security.AccessController; +import java.security.PrivilegedAction; /** * Utility for working with the xrandr commmand-line utility. Assumes @@ -103,7 +105,12 @@ public class XRandR { * xrandr is not supported */ public static Screen[] getConfiguration() { - populate(); + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + populate(); + return null; + } + }); return (Screen[]) current.clone(); }