Hello… I’m using the demo application from the Juce tutorial in my tests, but when I click the close button through my laptop’s touchpad, the main window do not close.
The following function is declared in my main dialog window:
It works just fine in all my apps! I assume you’ve tried catching it in the debugger to see what’s happening, so does the callback get triggered, and if so, what happens during the quit call?
The conclusion is that when I close the application through a ALT+F4, the alert window is shown and the app closes, but when I try to close it through my touchpad or mouse, closeButtonPressed() is never called.
On Juce demo application, the close button closes the application successfully. Maybe it’s a issue from the Juce tutorial application. Maybe something in the Juce library has changed since the last tutorial’s update.
That sounds likely. But like I’ve been saying to other people recently, aren’t you using a debugger? If you were, there should be an assertion if you try closing a window without having implemented a handler for it.
It may well be that whatever you are doing that is causing the debug build to crash, is silently exploding something in the release build, and you’re only seeing symptoms much much later (ie when trying to close the app).