Gtk.Window.prototype.set_attached_to

function set_attached_to(attach_widget:Gtk.Widget):void {
    // Gjs wrapper for gtk_window_set_attached_to()
}

Marks window as attached to attach_widget. This creates a logical binding between the window and the widget it belongs to, which is used by GTK+ to propagate information such as styling or accessibility to window as if it was a children of attach_widget.

Examples of places where specifying this relation is useful are for instance a Gtk.Menu created by a Gtk.ComboBox, a completion popup window created by Gtk.Entry or a typeahead search entry created by Gtk.TreeView.

Note that this function should not be confused with Gtk.set_transient_for, which specifies a window manager relation between two toplevels instead.

Passing null for attach_widget detaches the window.

Since 3.4

attach_widget

a Gtk.Widget, or null