---
name: "XtQueryGeometry"
section: "3"
platform: "linux"
package: "libxt"
version: "1.3.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XtQueryGeometry"
---

# XtQueryGeometry(3)

query the preferred geometry of a child widget

## NAME

XtQueryGeometry - query the preferred geometry of a child widget

## SYNTAX

\#include \<X11/Intrinsic.h\>

XtGeometryResult XtQueryGeometry(Widget *w*, XtWidgetGeometry \**intended*, XtWidgetGeometry \**preferred\_return*);

## ARGUMENTS

- *intended*

  Specifies any changes the parent plans to make to the child's geometry or NULL.

- *preferred\_return*

  Returns the child widget's preferred geometry.

- *w*

  Specifies the widget.

## DESCRIPTION

To discover a child's preferred geometry, the child's parent sets any changes that it intends to make to the child's geometry in the corresponding fields of the intended structure, sets the corresponding bits in intended.request\_mode, and calls **XtQueryGeometry**.

**XtQueryGeometry** clears all bits in the preferred\_return-\>request\_mode and checks the query\_geometry field of the specified widget's class record. If query\_geometry is not NULL, **XtQueryGeometry** calls the query\_geometry procedure and passes as arguments the specified widget, intended, and preferred\_return structures. If the intended argument is NULL, **XtQueryGeometry** replaces it with a pointer to an **XtWidgetGeometry** structure with request\_mode=0 before calling query\_geometry.

## SEE ALSO

[XtConfigureWidget(3)](/XtConfigureWidget/3.md), [XtMakeGeometryRequest(3)](/XtMakeGeometryRequest/3.md)\
 *X Toolkit Intrinsics - C Language Interface*\
 *Xlib - C Language X Interface*
