Hiding a ControlP5 controlWindow when the "main" app is minimized
in
Contributed Library Questions
•
1 year ago
If you minimize an app and a cp5 controlWindow is not hidden, it will remain visible. I understand this and am not saying it shouldn't. I however would like it to automatically hide(), especially since I have controlWindow.setUndecorated(true) set. One of the problems is that if you try to show the main window again, at least in mac OSX, you can't just click on it. You have to "right click"/double click, bring up the menu and click on the apps name at the top of the menu dialog in order to normalize it again.
I thought of trying to hide the controlWindow as part of the minimize event but can't seem to figure out how to do that. The following code event does not seem to be called. I'm a total newbie to java so just using the below may not be the thing to do. The sample code I found online for a WindowsListener event was not helpful and seemed like a heck of a lot of code that I didn't need. Is there a simple way to do some housekeeping, in my case hide the "child" windows, during the window minimize event? I would think that would be a common thing to want to do.
- public void windowIconified(WindowEvent e) {
- // hide the cp5 window
- cp5.window("controlP5window").hide();
- println("windowIconified event fired");
- }
1