We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, all. What I want to do is to display a popup message that blocks the window from closing for the P2D renderer. I could have
exit()make a blocking call, but then the main window doesn't refresh. So what I'd like to do is stop
exit() from being called at all until the popup is dismissed. I can prevent the sketch from closing for the ESC key by intercepting it in
keyPressed(), but I don't know how to make it work when I try to close the window directly via ALT+F4 or the window X button. For the default renderer I could just add an AWT window listener to
surface, but P2D uses
GLWindow as the underlying implementation, and I haven't figured out how to intercept OpenGL window events. So, my question: is what I want possible with P2D, and if so how do I do it?