I want that, whenever I run the application, all previous windows should be closed. I want to display only one window at a time.
Asked
Active
Viewed 107 times
1
-
Do you mean all windows of every app or the windows of your app? – Willeke Nov 14 '17 at 16:44
-
1@Willeke, when my app starts only last window should be shown rest should be closed. – Pankaj Mundra Nov 15 '17 at 04:21
-
Is this a document-based application? You could disable window restoration for documents. I'm not sure how you're managing windows if it's not, but you could also just programmatically close the windows on app termination. – Lucas Derraugh Nov 24 '17 at 12:30
-
@LucasDerraugh no, it's not a document-based application. – Pankaj Mundra Nov 25 '17 at 11:23
-
@PankajMundra So why not close all the windows on application termination? What is meant by the last window? The last window to have key focus? The last one to be opened? I really don't see why you can't enumerate over the application's windows and close the ones you don't want to be opened if that's really what you want. – Lucas Derraugh Nov 26 '17 at 11:46