G4P java Concurrent Modification Exception Error when exit() called

I’m trying to use the addOnCloseHandler() - but I see this only works if you use the CLOSE_WINDOW method. If I use CLOSE_WINDOW then when I show the window again it’s in a dead state - the controls and buttons are non-responsive, although the app doesn’t crash - so I’ve been using the HIDE_WINDOW method which works great.

How can I use the HIDE_WINDOW method but also capture when the user clicks the “x” to close the window instead of using the button (which hides the window)?

Sorry to be dense…I could find only one reference to “hide” in the documentation search feature…

Mike