From cce5a8e861a63dfceff21d45023a4d5fcad79b19 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 22 Apr 2004 15:41:39 +0000 Subject: Fixed (?) Issue 75: Dummy window confuses users and maximizing it can cause trouble git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@118 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java index 57d4333be..35369e06b 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java @@ -40,6 +40,7 @@ package net.java.games.jogl.impl.windows; import java.awt.Component; +import java.awt.EventQueue; import java.awt.Frame; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; @@ -91,7 +92,7 @@ public class WindowsGLContextFactory extends GLContextFactory { if (!pendingContextSet.contains(device)) { pendingContextSet.add(device); GraphicsConfiguration config = device.getDefaultConfiguration(); - Frame frame = new Frame(config); + final Frame frame = new Frame(config); frame.setUndecorated(true); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities(), null, @@ -101,6 +102,11 @@ public class WindowsGLContextFactory extends GLContextFactory { public void init(GLDrawable drawable) { pendingContextSet.remove(device); dummyContextMap.put(device, drawable.getGL()); + EventQueue.invokeLater(new Runnable() { + public void run() { + frame.dispose(); + } + }); } public void display(GLDrawable drawable) { -- cgit v1.2.3