So I’ve made a menu-like window that works very well for the most part. The only thing I haven’t been able to figure out is how to deal with a request to quit the application (i.e. the one that loaded the bundle) while the menu-like window is still visible. This leads to a crash
The JUCE menus have the same issue, except that they don’t crash (another) test application. Maybe because they’re modal, although making my own window modal didn’t result in much of a change.
So here are my questions:
- is it possible to detect clicks on the OSX menu bar (and on the dock, I guess)?
- is there a good way to intercept Command-Q from a bundle (as opposed to a standalone app)?
I’ve been looking at lots of potential solutions, but none of them panned out.
(btw, definition of a “menu-like” window thing: it’s a window that closes whenever you click anywhere outside it)