Window.getToplevel

Gets the toplevel window that’s an ancestor of window.

Any window type but gdk.types.WindowType.Child is considered a toplevel window, as is a gdk.types.WindowType.Child window that has a root window as parent.

Note that you should use gdk.window.Window.getEffectiveToplevel when you want to get to a window’s toplevel as seen on screen, because gdk.window.Window.getToplevel will most likely not do what you expect if there are offscreen windows in the hierarchy.

class Window
getToplevel
()

Return Value

Type: gdk.window.Window

the toplevel window containing window