xcb\_get\_input\_focus(3) XCB Requests xcb\_get\_input\_focus(3)

# [NAME](#NAME)

xcb\_get\_input\_focus -

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;xcb/xproto.h&gt;**

## [Request function](#Request_function)

xcb\_get\_input\_focus\_cookie\_t **xcb\_get\_input\_focus**(xcb\_connection\_t \**conn*,

## [Reply datastructure](#Reply_datastructure)

```
typedef struct xcb_get_input_focus_reply_t {


    uint8_t      response_type;


    uint8_t      revert_to;


    uint16_t     sequence;


    uint32_t     length;


    xcb_window_t focus;
} xcb_get_input_focus_reply_t;
```

## [Reply function](#Reply_function)

xcb\_get\_input\_focus\_reply\_t \***xcb\_get\_input\_focus\_reply**(xcb\_connection\_t \**conn*, xcb\_get\_input\_focus\_cookie\_t *cookie*, xcb\_generic\_error\_t \*\**e*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

# [REPLY FIELDS](#REPLY_FIELDS)

[*response\_type*](#response_type)

The type of this reply, in this case *XCB\_GET\_INPUT\_FOCUS*. This field is also present in the *xcb\_generic\_reply\_t* and can be used to tell replies apart from each other.

[*sequence*](#sequence)

The sequence number of the last request processed by the X11 server.

[*length*](#length)

The length of the reply, in words (a word is 4 bytes).

[*revert\_to*](#revert_to)

One of the following values:

[*XCB\_INPUT\_FOCUS\_NONE*](#XCB_INPUT_FOCUS_NONE)

The focus reverts to *XCB\_NONE*, so no window will have the input focus.

[*XCB\_INPUT\_FOCUS\_POINTER\_ROOT*](#XCB_INPUT_FOCUS_POINTER_ROOT)

The focus reverts to *XCB\_POINTER\_ROOT* respectively. When the focus reverts, FocusIn and FocusOut events are generated, but the last-focus-change time is not changed.

[*XCB\_INPUT\_FOCUS\_PARENT*](#XCB_INPUT_FOCUS_PARENT)

The focus reverts to the parent (or closest viewable ancestor) and the new revert\_to value is *XCB\_INPUT\_FOCUS\_NONE*.

[*XCB\_INPUT\_FOCUS\_FOLLOW\_KEYBOARD*](#XCB_INPUT_FOCUS_FOLLOW_KEYBOARD)

NOT YET DOCUMENTED. Only relevant for the xinput extension.

TODO: NOT YET DOCUMENTED.

[*focus*](#focus)

TODO: NOT YET DOCUMENTED.

# [DESCRIPTION](#DESCRIPTION)

# [RETURN VALUE](#RETURN_VALUE)

Returns an *xcb\_get\_input\_focus\_cookie\_t*. Errors have to be handled when calling the reply function *xcb\_get\_input\_focus\_reply*.

If you want to handle errors in the event loop instead, use *xcb\_get\_input\_focus\_unchecked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

This request does never generate any errors.

# [SEE ALSO](#SEE_ALSO)

# [AUTHOR](#AUTHOR)

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

libxcb 1.17.0 X Version 11

---

Document: xcb_get_input_focus_unchecked(3) from libxcb 1.17.0-r17 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
