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:
parent
5f9c4fac58
commit
34427b80f7
|
@ -40,6 +40,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.security.AccessController;
|
||||||
|
import java.security.PrivilegedAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility for working with the xrandr commmand-line utility. Assumes
|
* Utility for working with the xrandr commmand-line utility. Assumes
|
||||||
|
@ -103,7 +105,12 @@ public class XRandR {
|
||||||
* xrandr is not supported
|
* xrandr is not supported
|
||||||
*/
|
*/
|
||||||
public static Screen[] getConfiguration() {
|
public static Screen[] getConfiguration() {
|
||||||
populate();
|
AccessController.doPrivileged(new PrivilegedAction() {
|
||||||
|
public Object run() {
|
||||||
|
populate();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return (Screen[]) current.clone();
|
return (Screen[]) current.clone();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue