summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-09-27 14:48:20 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-09-27 14:48:20 +0000
commit863320e845061f3191e0e77b05898e061e5afdde (patch)
treec971aca601de3d013f1d18d94b9e019fe231fb59
parent8b2a2c3db5efb6b309655601604c0822d42910ca (diff)
downloadmocca-863320e845061f3191e0e77b05898e061e5afdde.tar.gz
mocca-863320e845061f3191e0e77b05898e061e5afdde.tar.bz2
mocca-863320e845061f3191e0e77b05898e061e5afdde.zip
Elevate permissions to request focus from browser
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1139 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index cf2fba35..495b9726 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -34,6 +34,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.security.AccessController;
import java.security.AllPermission;
+import java.security.PrivilegedAction;
import java.util.Locale;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
@@ -366,11 +367,17 @@ public class BKUApplet extends JApplet {
}
}
- public void getFocusFromBrowser() {
- log.debug("Obtained focus from browser.");
+ public void getFocusFromBrowser() {
+ log.debug("Obtained focus from browser.");
- worker.getFocusFromBrowser();
- }
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
+ public Void run() {
+ worker.getFocusFromBrowser();
+ return null;
+ }
+ });
+ }
private boolean checkPermissions() {
try {