Lines 40-76
Link Here
|
40 |
|
40 |
|
41 |
package javax.media.opengl.awt; |
41 |
package javax.media.opengl.awt; |
42 |
|
42 |
|
43 |
import java.beans.Beans; |
43 |
import com.jogamp.common.GlueGenVersion; |
44 |
import java.lang.reflect.Method; |
44 |
import com.jogamp.common.util.VersionUtil; |
45 |
import java.security.AccessController; |
45 |
import com.jogamp.common.util.locks.LockFactory; |
46 |
import java.security.PrivilegedAction; |
46 |
import com.jogamp.common.util.locks.RecursiveLock; |
|
|
47 |
import com.jogamp.opengl.JoglVersion; |
48 |
import jogamp.nativewindow.jawt.JAWTWindow; |
49 |
import jogamp.opengl.Debug; |
50 |
import jogamp.opengl.GLContextImpl; |
51 |
import jogamp.opengl.GLDrawableHelper; |
52 |
import jogamp.opengl.ThreadingImpl; |
47 |
|
53 |
|
48 |
import java.awt.Canvas; |
|
|
49 |
import java.awt.Color; |
50 |
import java.awt.FontMetrics; |
51 |
import java.awt.Frame; |
52 |
import java.awt.Graphics; |
53 |
import java.awt.GraphicsConfiguration; |
54 |
import java.awt.GraphicsDevice; |
55 |
import java.awt.geom.Rectangle2D; |
56 |
|
57 |
import java.awt.EventQueue; |
58 |
import java.lang.reflect.InvocationTargetException; |
59 |
import java.util.ArrayList; |
60 |
import java.util.List; |
61 |
|
62 |
import javax.media.nativewindow.OffscreenLayerOption; |
63 |
import javax.media.nativewindow.WindowClosingProtocol; |
64 |
import javax.media.nativewindow.AbstractGraphicsDevice; |
54 |
import javax.media.nativewindow.AbstractGraphicsDevice; |
65 |
import javax.media.nativewindow.AbstractGraphicsScreen; |
55 |
import javax.media.nativewindow.AbstractGraphicsScreen; |
66 |
import javax.media.nativewindow.GraphicsConfigurationFactory; |
56 |
import javax.media.nativewindow.GraphicsConfigurationFactory; |
67 |
import javax.media.nativewindow.NativeSurface; |
57 |
import javax.media.nativewindow.NativeSurface; |
68 |
import javax.media.nativewindow.NativeWindowFactory; |
58 |
import javax.media.nativewindow.NativeWindowFactory; |
|
|
59 |
import javax.media.nativewindow.OffscreenLayerOption; |
60 |
import javax.media.nativewindow.WindowClosingProtocol; |
69 |
import javax.media.nativewindow.awt.AWTGraphicsConfiguration; |
61 |
import javax.media.nativewindow.awt.AWTGraphicsConfiguration; |
70 |
import javax.media.nativewindow.awt.AWTGraphicsDevice; |
62 |
import javax.media.nativewindow.awt.AWTGraphicsDevice; |
71 |
import javax.media.nativewindow.awt.AWTGraphicsScreen; |
63 |
import javax.media.nativewindow.awt.AWTGraphicsScreen; |
72 |
import javax.media.nativewindow.awt.AWTWindowClosingProtocol; |
64 |
import javax.media.nativewindow.awt.AWTWindowClosingProtocol; |
73 |
|
|
|
74 |
import javax.media.opengl.GL; |
65 |
import javax.media.opengl.GL; |
75 |
import javax.media.opengl.GLAnimatorControl; |
66 |
import javax.media.opengl.GLAnimatorControl; |
76 |
import javax.media.opengl.GLAutoDrawable; |
67 |
import javax.media.opengl.GLAutoDrawable; |
Lines 85-104
Link Here
|
85 |
import javax.media.opengl.GLProfile; |
76 |
import javax.media.opengl.GLProfile; |
86 |
import javax.media.opengl.GLRunnable; |
77 |
import javax.media.opengl.GLRunnable; |
87 |
import javax.media.opengl.Threading; |
78 |
import javax.media.opengl.Threading; |
|
|
79 |
import java.awt.Canvas; |
80 |
import java.awt.Color; |
81 |
import java.awt.EventQueue; |
82 |
import java.awt.FontMetrics; |
83 |
import java.awt.Frame; |
84 |
import java.awt.Graphics; |
85 |
import java.awt.GraphicsConfiguration; |
86 |
import java.awt.GraphicsDevice; |
87 |
import java.awt.geom.Rectangle2D; |
88 |
import java.beans.Beans; |
89 |
import java.lang.reflect.InvocationTargetException; |
90 |
import java.lang.reflect.Method; |
91 |
import java.security.AccessController; |
92 |
import java.security.PrivilegedAction; |
93 |
import java.util.ArrayList; |
94 |
import java.util.List; |
88 |
|
95 |
|
89 |
import com.jogamp.common.GlueGenVersion; |
|
|
90 |
import com.jogamp.common.util.VersionUtil; |
91 |
import com.jogamp.opengl.JoglVersion; |
92 |
|
93 |
import com.jogamp.common.util.locks.LockFactory; |
94 |
import com.jogamp.common.util.locks.RecursiveLock; |
95 |
|
96 |
import jogamp.nativewindow.jawt.JAWTWindow; |
97 |
import jogamp.opengl.Debug; |
98 |
import jogamp.opengl.GLContextImpl; |
99 |
import jogamp.opengl.GLDrawableHelper; |
100 |
import jogamp.opengl.ThreadingImpl; |
101 |
|
102 |
// FIXME: Subclasses need to call resetGLFunctionAvailability() on their |
96 |
// FIXME: Subclasses need to call resetGLFunctionAvailability() on their |
103 |
// context whenever the displayChanged() function is called on our |
97 |
// context whenever the displayChanged() function is called on our |
104 |
// GLEventListeners |
98 |
// GLEventListeners |
Lines 888-893
Link Here
|
888 |
adeviceMsg = null; |
882 |
adeviceMsg = null; |
889 |
} |
883 |
} |
890 |
boolean closed = awtConfig.getScreen().getDevice().close(); |
884 |
boolean closed = awtConfig.getScreen().getDevice().close(); |
|
|
885 |
//Also close native graphics configuration, which seems to be important for X11 |
886 |
awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice().close(); |
891 |
if(DEBUG) { |
887 |
if(DEBUG) { |
892 |
System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed); |
888 |
System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed); |
893 |
} |
889 |
} |