Return the top-of-hierarchy window containing the widget. In standard Tk this is always a Toplevel widget.
tkinter/Misc.winfo_toplevel
Misc.winfo_toplevel