From: Carsten W. <ca...@us...> - 2006-12-11 15:43:56
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7542/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: destroy window in the awt event dispatcher thread Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Jsr231Driver.java 7 Dec 2006 22:31:10 -0000 1.14 --- Jsr231Driver.java 11 Dec 2006 15:43:44 -0000 1.15 *************** *** 229,250 **** public void shutdown() { ! if (oldDisplayMode != null && device.getFullScreenWindow() != null) { ! try { if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); ! } catch (Exception e) { e.printStackTrace(); } ! } ! if (window != null) { ! display.destroy(); ! window.dispose(); ! } } /** ! * @return true ! */ public boolean init(int xpos, int ypos) { // set window position --- 229,259 ---- public void shutdown() { ! try { ! EventQueue.invokeAndWait(new Runnable() { ! public void run() { ! if (oldDisplayMode != null ! && device.getFullScreenWindow() != null) { ! try { if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); ! } catch (Exception e) { e.printStackTrace(); + } } ! if (window != null) { ! display.destroy(); ! window.dispose(); ! } ! } ! }); ! } catch (Exception e) { ! e.printStackTrace(); ! } } /** ! * @return true ! */ public boolean init(int xpos, int ypos) { // set window position |