aboutsummaryrefslogtreecommitdiffstats
path: root/src/javax
diff options
context:
space:
mode:
authorEgor Tsinko <[email protected]>2019-08-29 14:44:09 -0600
committerGitHub <[email protected]>2019-08-29 14:44:09 -0600
commit7144715d20a61ad92e51acf6d3a782bef009ce2c (patch)
treecd99f26661675df05bfb103d5d0a3283ab714e66 /src/javax
parent54d37207423e46ea80975651910478baa8dd8421 (diff)
Fixed error that happened in multi-screen environments
Diffstat (limited to 'src/javax')
-rw-r--r--src/javax/media/j3d/JoglPipeline.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/javax/media/j3d/JoglPipeline.java b/src/javax/media/j3d/JoglPipeline.java
index c45fd61..430fd3e 100644
--- a/src/javax/media/j3d/JoglPipeline.java
+++ b/src/javax/media/j3d/JoglPipeline.java
@@ -6540,14 +6540,6 @@ class JoglPipeline extends Pipeline {
glDrawable.setRealized(false);
}
else {
-
- // TODO can't find an implementation which avoids the use of QueryCanvas
- // JOGL requires a visible Frame for an onscreen context
-
- Frame f = new Frame();
- f.setUndecorated(true);
- f.setLayout(new BorderLayout());
-
ContextQuerier querier = new ContextQuerier(cv);
AWTGraphicsConfiguration awtConfig =
@@ -6555,6 +6547,13 @@ class JoglPipeline extends Pipeline {
QueryCanvas canvas = new QueryCanvas(awtConfig, querier);
+ // TODO can't find an implementation which avoids the use of QueryCanvas
+ // JOGL requires a visible Frame for an onscreen context
+
+ Frame f = new Frame(canvas.getGraphicsConfiguration());
+ f.setUndecorated(true);
+ f.setLayout(new BorderLayout());
+
f.add(canvas, BorderLayout.CENTER);
f.setSize(MIN_FRAME_SIZE, MIN_FRAME_SIZE);
f.setVisible(true);