there are few operational details worth noticing hereall of which are more obvious if you run this script on your machineintercepting closesprotocol because the window manager close event has been intercepted by this script using the top-level widget protocol methodpressing the in the top-right corner doesn' do anything in the three toplevel pop ups the name string wm_delete_window identifies the close operation you can use this interface to disallow closes apart from the widgets your script creates the function created by this script' lambda:none does nothing but return none killing one window (and its children)destroy pressing the big black buttons in any one of the three pop ups kills that pop up onlybecause the pop up runs the widget destroy method the other windows live onmuch as you would expect of pop-up dialog window technicallythis call destroys the subject widget and any other widgets for which it is parent for windowsthis includes all their content for simpler widgetsthe widget is erased because toplevel windows have parentstootheir relationships might matter on destroy--destroying windoweven the automatic or first-made tk root which is used as the default parentalso destroys all its child windows since tk root windows have no parentsthey are unaffected by destroys of other windows moreoverdestroying the last tk root window remaining (or the only tk root createdeffectively ends the program toplevel windowshoweverare always destroyed with their parentsand their destruction doesn' impact other windows to which they are not ancestors this makes them ideal for pop-up dialogs technicallya toplevel can be child of any type of widget and will be destroyed with itthough they are usually children of an automatic or explicit tk top-level windows