From e6225fce71daa90a2a2b631550ba048c2a84ff25 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 27 Oct 2010 16:39:20 +0200 Subject: WindowImpl/GLWindow LifecycleHook: - 'destroyAction' -> 'destroyActionPreLock' 'destroyActionInLock', to be able to stop animation before locking. GLDrawableHelper.invokeGL() dispose case (initAction == null): - pause animator if animating before makeCurrent (locking) GLCanvas/GLJPanel dispose: recreate case - resume animator if was animating --- ...TestSwingAWTRobotUsageBeforeJOGLInitBug411.java | 51 +++++++++------------- .../test/junit/newt/TestGLWindows01NEWT.java | 24 ++++------ .../junit/newt/TestGLWindows02NEWTAnimated.java | 46 +++++++++++++++---- 3 files changed, 65 insertions(+), 56 deletions(-) (limited to 'src/junit/com/jogamp/test') diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java b/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java index 62fc02251..e77f4f8b0 100644 --- a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java +++ b/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java @@ -28,7 +28,6 @@ package com.jogamp.test.junit.jogl.awt; -import com.jogamp.test.junit.util.UITestCase; import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears; import com.jogamp.test.junit.util.*; @@ -43,19 +42,15 @@ import com.jogamp.newt.Screen; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.newt.awt.NewtCanvasAWT; -import java.awt.AWTException; import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.AWTException; -import java.awt.LayoutManager; import java.awt.Robot; import java.awt.Point; import java.awt.Rectangle; import java.awt.event.InputEvent; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; @@ -68,7 +63,6 @@ import javax.swing.BorderFactory; import javax.swing.border.Border; import org.junit.Assert; -import org.junit.Assume; import org.junit.BeforeClass; import org.junit.AfterClass; import org.junit.Test; @@ -238,12 +232,10 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { } robot.mouseRelease(InputEvent.BUTTON1_MASK); - for(int i=0; !windowClosing && i