def on_quit(event): # root.set_state(False, kill=True) Window.display_window(menu_id) # use the id to get main menu window