From 7144715d20a61ad92e51acf6d3a782bef009ce2c Mon Sep 17 00:00:00 2001 From: Egor Tsinko Date: Thu, 29 Aug 2019 14:44:09 -0600 Subject: Fixed error that happened in multi-screen environments --- src/javax/media/j3d/JoglPipeline.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') 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); -- cgit v1.2.3