Hello Paul,
yes i noticed this by myself last week. Its a bit complicated deadlock
on close and should only happen on X11 (nvidia?). Sven already fixed it
but it reappeared. Should go away as soon the GLProfile.initSigleton()
eager-init workaround is no longer needed (but its really a nice
locking optimization right now - X11 code is much simpler).
but feel free to file a bug report. just paste your mail into it.
best regards,
michael
On 07/03/2010 08:58 AM, Paul Alesius [via jogamp] wrote:
Hi
I'm using the latest JOGL that I've built from source from the git
repository. (JOGL-2.0-pre-0702)
When doing a static initialization of the framework with
GLProfile.initSingleton() and then creating an AWT frame, then I can't
close the AWT frame because it doesn't seem to get the "window closing"
events.
Am I doing something wrong here or is this a bug?
--------------------------------------------------------------------------------
Example code:
public class Main {
static {
GLProfile.initSingleton(); // Causes the frame to never get the WindowEvent
}
public static void main(String... args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Frame frame = new Frame();
frame.setSize(500, 500);
addWindowListener(frame);
frame.setVisible(true);
}
public void addWindowListener(final Frame frame) {
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent ev) { // Never gets this event
System.out.println("windowClosing()");
frame.dispose();
}
});
}
});
}
}
--------------------------------------------------------------------------------
If I put the GLProfile.initSingleton() in a new thread (new Thread(new
Runnable(){public void run() {GLProfile.initSingleton;}})) then it
works and I can close the AWT window, but I'm not sure what's going on
here or if it will cause instabilities/lockups later in my test
application.
Also, when using newt, is there a way to make the windows
non-resizable?
Thank you