Window.getParent

Obtains the parent of window, as known to GDK. Does not query the X server; thus this returns the parent as passed to Window.new, not the actual parent. This should never matter unless you’re using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Note that you should use Window.getEffectiveParent when writing generic code that walks up a window hierarchy, because Window.getParent will most likely not do what you expect if there are offscreen windows in the hierarchy.

class Window
getParent
()

Return Value

Type: Window

parent of window