From 0726ad61bfdc3300f3237d837d69c23826d31270 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Wed, 4 May 2011 20:34:30 +0000 Subject: [PATCH] * Fix LwjglCanvas freezing on Windows XP git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7445 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java index f03b4f1ed..441ec50fb 100644 --- a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java +++ b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java @@ -278,6 +278,13 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex */ protected void destroyContext(){ if (Display.isCreated()){ + try { + // NOTE: On Windows XP, not calling setParent(null) + // freezes the application. + Display.setParent(null); + } catch (LWJGLException ex) { + logger.log(Level.SEVERE, "Encountered exception when setting parent to null", ex); + } Display.destroy(); }