aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/javax/media/opengl/GLJPanel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java
index 445ea3c4d..8d9b3c851 100644
--- a/src/classes/javax/media/opengl/GLJPanel.java
+++ b/src/classes/javax/media/opengl/GLJPanel.java
@@ -506,10 +506,13 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
if (curSurface != null) {
if (j2dSurface != curSurface) {
if (joglContext != null) {
+ // Note that the following operation may make the
+ // joglContext current briefly
joglContext.destroy();
joglContext = null;
joglDrawable = null;
sendReshape = true;
+ j2dContext.makeCurrent();
if (DEBUG) {
System.err.println("Sending reshape because surface changed");
System.err.println("New surface = " + curSurface);