---
name: "XmImSetFocusValues"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmImSetFocusValues"
---

# XmImSetFocusValues(3)

An input manager function that notifies an input manager that a widget has received input focus and updates the input context attributes

## NAME

**XmImSetFocusValues** — An input manager function that notifies an input manager that a widget has received input focus and updates the input context attributes

## SYNOPSIS

```
#include <Xm/XmIm.h>
void XmImSetFocusValues(
Widget widget,
ArgList arglist,
Cardinal argcount,
);
```

## DESCRIPTION

**XmImSetFocusValues** notifies the input manager that the specified widget has received input focus. This function also updates the attributes of the input context associated with the widget. The focus window for the XIC is set to the window of the widget. The *arglist* argument is a list of attribute/value pairs for the input context. This function passes the attributes and values to **XICSetValues**. The caller of this routine should pass in only those values that have changed since the last call to any of these functions; **XmImSetValues**, **XmImSetFocusValues**, **XmImVaSetValues**, or **XmImVaSetFocusValues**. See the description in the [**XmImSetValues**(3)](/XmImSetValues/3.md) reference page for a list of associated resources.

If the previous parameters for the widget's XIC do not allow the previously registered XIC to be reused, that XIC will be unregistered, and a new one will be created and registered with the widget. Note that sharing of data is preserved.

- *widget*

  Specifies the ID of the widget registered with the input manager.

- *arglist*

  Specifies the list of attribute/value pairs to be passed to **XICSetValues**. See the description in the [**XmImSetValues**(3)](/XmImSetValues/3.md) man page for a description of resources.

- *argcount*

  Specifies the number of attribute/values pairs in the argument list (*arglist)*

Note that the Text and TextField widgets call the **XmImSetFocusValues** function when they receive focus. Therefore, further calls to the **XmImSetFocusValues** function for these widgets are unnecessary.

## RELATED

[**XmImSetValues**(3)](/XmImSetValues/3.md), [**XmImVaSetFocusValues**(3)](/XmImVaSetFocusValues/3.md), and [**XmImVaSetValues**(3)](/XmImVaSetValues/3.md).
