I'm trying to do something when a window is manually closed in tkinter and don't know a method/function to do so. A simple example of what im trying to do in a smaller scale.
from tkinter import *
root = Tk()
rootIsClosed = False # how to do this? How to make it True?
if rootIsClosed: # ?
new_win = Tk()
x = Label(new_win, text='why did you close the program').pack()