Gets the toplevel window that’s an ancestor of this.
Any window type but gdk_window_child is considered a toplevel window, as is a gdk_window_child window that has a root window as parent.
Note that you should use get_effective_toplevel when you want to get to a window’s toplevel as seen on screen, because get_toplevel will most likely not do what you expect if there are offscreen windows in the hierarchy.
this |
a Window |
the toplevel window containing this |