diff options
author | Kenneth Russel <[email protected]> | 2004-04-22 15:41:39 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-04-22 15:41:39 +0000 |
commit | cce5a8e861a63dfceff21d45023a4d5fcad79b19 (patch) | |
tree | a7d5a9a6413433671c84e00c9a71e846b678c608 /src/net/java/games/jogl | |
parent | e0b0bb3c13c0539df0625b73581f7a55476b32b7 (diff) |
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
Diffstat (limited to 'src/net/java/games/jogl')
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java | 8 |
1 files changed, 7 insertions, 1 deletions
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) { |