If, you are talking about browser windows & tabbed browsing, the question comes to mind, what browser? Seems most, when you do that give a Question windows asking if you want to close the Current Tab or All Tabs.
Please, explain more or better. Sorry, if I seem blind to your meaning.
Best answer is to discipline yourself to NOT hitting the X. But not the answer you want!
You can try, in IE, under "Tools", hitting the "Reopen last browsing session." But this can, somtimes, not reopen one or two of the buried tabs. It will not reopen the Tab Windows, but that you can do manually.
If I had all the answers, I would not need to use this forum. Glad it is here. When I open windows, I go to file and hit "add new tab". Then I open files in these new tab locations. I think the ("You can try, in IE, under "Tools", hitting the "Reopen last browsing session.") As I was typing a reply, I noticed you said "It will not reopen the Tab Windows".
My new question is "How can I open multiple windows other than using the Tab button"?
Surprise, Surprise, I was able to Hit the RED X which closed everything and then when I opened IE and hit the "Tools Button" to reopen last browsing session, it opened every thing as it was even all the tab windows. Guess that is the right thing to do. At least it is what I wanted it to do.
Glad you got it sorted, Wilhelm. I can see from my post that perhaps you misunderstood what I advised - my fault. I did mean it would reinstate all of the tabs, but not neccessarily open ALL the tabbed windows, if you had, for example, tabs opened in already tabbed windows. (crikey. I hope that makes sense, but never mind, it is now doing what you wereaseeking")