From 863320e845061f3191e0e77b05898e061e5afdde Mon Sep 17 00:00:00 2001 From: tkellner Date: Thu, 27 Sep 2012 14:48:20 +0000 Subject: Elevate permissions to request focus from browser git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1139 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../main/java/at/gv/egiz/bku/online/applet/BKUApplet.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'BKUApplet') 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() { + @Override + public Void run() { + worker.getFocusFromBrowser(); + return null; + } + }); + } private boolean checkPermissions() { try { -- cgit v1.2.3