API Reference / @gtkx/react / index / useParentWindow
Variable: useParentWindow
constuseParentWindow: () =>Gtk.Window|null
Defined in: hooks/use-parent-window.d.ts:9
Returns the Gtk.Window of the nearest window ancestor. This is null on the first render even inside a window, because a window provides itself only once its GObject exists, and stays null outside one. The component re-renders when it resolves, so derive from the value rather than reading it once.
Returns
Gtk.Window | null