Wait until window is destroyed, continuing to process events in the meantime. If window is omitted, this widget is used. This is typically used to wait for the user to finish interacting with a dialog box.
tkinter/Misc.wait_window
Misc.wait_window