diff options
author | Kenneth Russel <[email protected]> | 2009-06-13 01:11:45 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-06-13 01:11:45 +0000 |
commit | 14cd8e9174b80a1f9c5ef92c273c0558d97ae79e (patch) | |
tree | 70d845e5f8df4afbe4312e382aa428f3780836a3 /src/jogl/classes/javax | |
parent | f5dde26f642700e149724299bec78a98d1e2dfbc (diff) |
Attempt to get disableBackgroundErase hack working again with 6u10+,
but despite calling method, still see flickering with 6u13
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1938 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index a23263a8f..a510efc10 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -661,10 +661,17 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { - disableBackgroundEraseMethod = - getToolkit().getClass().getDeclaredMethod("disableBackgroundErase", - new Class[] { Canvas.class }); - disableBackgroundEraseMethod.setAccessible(true); + Class clazz = getToolkit().getClass(); + while (clazz != null && disableBackgroundEraseMethod == null) { + try { + disableBackgroundEraseMethod = + clazz.getDeclaredMethod("disableBackgroundErase", + new Class[] { Canvas.class }); + disableBackgroundEraseMethod.setAccessible(true); + } catch (Exception e) { + clazz = clazz.getSuperclass(); + } + } } catch (Exception e) { } return null; |