Unwanted window close behaviour

classic Classic list List threaded Threaded
3 messages Options
Gin
Reply | Threaded
Open this post in threaded view
|

Unwanted window close behaviour

Gin
Hi,

I'm currently running into an issue with a GLCanvas disposing itself when the window close event is fired. While this is normally desired behaviour I want to ask the user for confirmation first. If the user wants to cancel the closing of the application it should keep running like nothing ever happened, this however is not the case. The canvas is disposed and I'm left with a empty area where my opengl stuff used to be.

Example:

1) JFrame with a GLCanvas
2) Set default close operation to none like so:
2b) this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
3) trigger a close event
4) GLCanvas is gone, application remains

Have I missed some setting? Is this a case of JOGL trying to do too much for the developer?

Thanks,

Gin
Reply | Threaded
Open this post in threaded view
|

Re: Unwanted window close behaviour

Demoscene Passivist
Administrator
This is a known bug from JOGL. A discussion regarding this issue can be found here: http://jogamp.762907.n3.nabble.com/windowClosing-causes-GLCanvas-to-displose-tp1380491p1380491.html

As far as I know it hasn't been fixed yet
Gin
Reply | Threaded
Open this post in threaded view
|

Re: Unwanted window close behaviour

Gin
And here I was thinking I did a proper search, thanks