From 3aee79d92e58f0ca82b737b0099bbc52abded952 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 6 Jan 2009 02:24:22 +0000 Subject: Deleted broken attempt at transparent window code from AWTWindow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1840 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/javafx/newt/awt/AWTWindow.java | 28 ++-------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java index 2315cb1a4..ee3e97a38 100644 --- a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java +++ b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java @@ -43,6 +43,8 @@ import java.awt.GraphicsEnvironment; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; import java.awt.event.*; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.*; import com.sun.javafx.newt.Window; import javax.media.opengl.GLCapabilities; @@ -58,29 +60,6 @@ public class AWTWindow extends Window { title = "AWT NewtWindow"; } - static void setWindowAlpha(java.awt.Window w, float alpha) { - // hack for macosx only - Object peer = w.getPeer(); - if (peer == null) { - return; - } - Class peerClass = peer.getClass(); - - //noinspection EmptyCatchBlock - try { - Class nativeClass = Class.forName("apple.awt.CWindow"); - if (nativeClass.isAssignableFrom(peerClass)) { - Method setAlpha = nativeClass.getMethod("setAlpha", - new Class[] {float.class}); - setAlpha.invoke(peer, new Object[] { new Double(Math.max(0.0f, Math.min(alpha, 1.0f)))}); - } - } catch (ClassNotFoundException e) { - } catch (NoSuchMethodException e) { - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { - } - } - private Frame frame; private Canvas canvas; private LinkedList/**/ events = new LinkedList(); @@ -102,9 +81,6 @@ public class AWTWindow extends Window { public void run() { frame = new Frame(getTitle()); frame.setUndecorated(isUndecorated()); - if (isUndecorated()) { - setWindowAlpha(frame, 0); - } frame.setLayout(new BorderLayout()); canvas = new Canvas(); Listener listener = new Listener(); -- cgit v1.2.3