Ui-group - type dialog. how to 'prevent' closing the window

I am not sure i have worded the FR correctly. but this is the gist.