Package: gtk

Accessor gtk-window-transient-for

Lambda List

gtk-window-transient-for (object)

Syntax

(gtk-window-transient-for object) => parent
(setf (gtk-window-transient-for object) parent)

Arguments

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

Details

Accessor of the transient-for slot of the gtk-window class.

The gtk-window-transient-for slot access function returns the transient parent for the window, or nil if no transient parent has been set. The (setf gtk-window-transient-for) slot access function sets the parent window.

Dialogs should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. The gtk-dialog-new-with-buttons function and other convenience functions in GTK will sometimes call the gtk-window-transient-for function on your behalf.

Passing nil for the parent argument unsets the current transient window.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X11.
 

See also

2021-9-9