---
name: "XtSetSensitive"
section: "3x"
platform: "linux"
package: "libxt-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/XtSetSensitive/3x"
---

# XtSetSensitive(3x)

set and check a widget's sensitivity state

## NAME

XtSetSensitive, XtIsSensitive - set and check a widget's sensitivity state

## SYNTAX

void XtSetSensitive(Widget *w*, Boolean *sensitive*);

Boolean XtIsSensitive(Widget *w*);

## ARGUMENTS

- *sensitive*

  Specifies a Boolean value that indicates whether the widget should receive  keyboard and pointer events.

- *w*

  Specifies the widget.

## DESCRIPTION

The *XtSetSensitive* function first calls *XtSetValues* on the current widget with an argument list specifying that the sensitive field should change to the new value. It then recursively propagates the new value down the managed children tree by calling *XtSetValues* on each child to set the ancestor\_sensitive to the new value if the new values for sensitive and the child's ancestor\_sensitive are not the same.

*XtSetSensitive* calls *XtSetValues* to change sensitive and ancestor\_sensitive. Therefore, when one of these changes, the widget's set\_values procedure should take whatever display actions are needed (for example, greying out or stippling the widget).

*XtSetSensitive* maintains the invariant that if parent has either sensitive  or ancestor\_sensitive  *False*, then all children have ancestor\_sensitive  *False*.

The *XtIsSensitive* function returns  *True* or  *False* to indicate whether or not user input events are being dispatched. If both core.sensitive and core.ancestor\_sensitive are  *True*, *XtIsSensitive* returns  *True*; otherwise, it returns  *False*.

## SEE ALSO

*X Toolkit Intrinsics - C Language Interface*\
 *Xlib - C Language X Interface*
