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)

This commit is contained in:
kappa1 2010-04-14 22:34:43 +00:00
parent 5f9c4fac58
commit 34427b80f7
1 changed files with 8 additions and 1 deletions

View File

@ -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();
}