Package: gtk

Accessor gtk:window-attached-to

Lambda List

gtk:window-attached-to (object)

Syntax

(gtk:window-attached-to object) => widget
(setf (gtk:window-attached-to object) widget)

Arguments

object -- a gtk:window widget
widget -- a gtk:widget object, or nil

Details

The accessor for the attached-to slot gets or sets the widget where the window is attached. Returns nil if the window is not attached to any 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 the window as if it was a child of widget.

Examples of places where specifying this relation is useful are for instance a gtk:menu widget created by a gtk:combo-box widget, a completion popup window created by a gtk:entry widget or a typeahead search entry created by a gtk:tree-view widget.

Note that this function should not be confused with the gtk:window-transient-for function, which specifies a window manager relation between two toplevels instead.

Passing nil for the widget argument detaches the window.
 

See also

2026-06-04