GTK+ uses a height-for-width (and width-for-height) geometry management system.
During the recursive allocation process it’s important to note that request cycles will be recursively executed while container widgets allocate their children.
Each container widget, once allocated a size, will go on to first share the space in one orientation among its children and then request each child's height for its target allocated width or its width for allocated height, depending.
In this way a will typically be requested its size a number of times before actually being allocated a size.
The size a widget is finally allocated can of course differ from the size it has requested.
The geometry management system will query a widget hierarchy in only one orientation at a time.
When widgets are initially queried for their minimum sizes it is generally done in two initial passes in the .
Because the preferred widths for each container depend on the preferred widths of their children, this information propagates up the hierarchy, and finally a minimum and natural width is determined for the entire toplevel.
Next, the toplevel will use the minimum width to query for the minimum height contextual to that width using ).
For this reason, caches a small number of results to avoid re-querying for the same sizes in one allocation cycle.