Is it possible to handle some finishing stuffs when user press the X button in DismissOverlayView? Like save some files, etc.

Alternatively, I would like to pause the app before the X button and resume if X is not selected.