Skip to content

Commit 76984ad

Browse files
authored
Merge pull request #2 from etsinko/fix-to-multiscreen-query
Fixed an error that happened in multi-screen environments
2 parents 54d3720 + 7144715 commit 76984ad

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/javax/media/j3d/JoglPipeline.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6540,21 +6540,20 @@ void createQueryContext(Canvas3D cv, Drawable drawable,
65406540
glDrawable.setRealized(false);
65416541
}
65426542
else {
6543-
6544-
// TODO can't find an implementation which avoids the use of QueryCanvas
6545-
// JOGL requires a visible Frame for an onscreen context
6546-
6547-
Frame f = new Frame();
6548-
f.setUndecorated(true);
6549-
f.setLayout(new BorderLayout());
6550-
65516543
ContextQuerier querier = new ContextQuerier(cv);
65526544

65536545
AWTGraphicsConfiguration awtConfig =
65546546
(AWTGraphicsConfiguration)Canvas3D.graphicsConfigTable.get(cv.graphicsConfiguration).getPrivateData();
65556547

65566548
QueryCanvas canvas = new QueryCanvas(awtConfig, querier);
65576549

6550+
// TODO can't find an implementation which avoids the use of QueryCanvas
6551+
// JOGL requires a visible Frame for an onscreen context
6552+
6553+
Frame f = new Frame(canvas.getGraphicsConfiguration());
6554+
f.setUndecorated(true);
6555+
f.setLayout(new BorderLayout());
6556+
65586557
f.add(canvas, BorderLayout.CENTER);
65596558
f.setSize(MIN_FRAME_SIZE, MIN_FRAME_SIZE);
65606559
f.setVisible(true);

0 commit comments

Comments
 (0)